## Currency conversion helpppppppp!!!

Solved
Occasional Contributor
Posts: 5

# Currency conversion helpppppppp!!!

i've got the data has different currency

need to calculate the amout of money that has been received for each order in aud

how could i do that?

Accepted Solutions
Solution
‎06-02-2017 05:12 AM
Super User
Posts: 10,574

## Re: Currency conversion helpppppppp!!!

Posted in reply to s34831850

You need a second table that contains currency, date and exchange rate. Then you can join on currency and date to retrieve the rate for the calculation.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code

All Replies
Solution
‎06-02-2017 05:12 AM
Super User
Posts: 10,574

## Re: Currency conversion helpppppppp!!!

Posted in reply to s34831850

You need a second table that contains currency, date and exchange rate. Then you can join on currency and date to retrieve the rate for the calculation.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Occasional Contributor
Posts: 5

## Re: Currency conversion helpppppppp!!!

Posted in reply to KurtBremser

you mean this data right?

Posts: 1,848

## Re: Currency conversion helpppppppp!!!

Posted in reply to s34831850

I don't see different currencies in your post - they are all NZD.

In case you have realy different currencies, you have to look for currency rates per date -

some external data or web tool.

Super Contributor
Posts: 271

## Re: Currency conversion helpppppppp!!!

Posted in reply to s34831850

You should have dataset for currency conversion .

This should contain currency conversion rate for all currency to AUD. This dataset should have rate on every day.

Currency Conversion

DATE    CURRENCY    RATE

Then you should join your Transaction table to Currency Conversion based on Date and Currency find the value in AUD.

Occasional Contributor
Posts: 5

## Re: Currency conversion helpppppppp!!!

this one right?

using left join?

and then using rate*the amount

Super User
Posts: 10,574

## Re: Currency conversion helpppppppp!!!

Posted in reply to s34831850

Left join, with your original dataset on the left. If your exchange rate table does not cover all combinations of currency&date, you have to deal with that. Best by expanding the currency table.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Occasional Contributor
Posts: 5

## Re: Currency conversion helpppppppp!!!

Posted in reply to KurtBremser
got it!!! thxs
Occasional Contributor
Posts: 5

## Re: Currency conversion helpppppppp!!!

Posted in reply to KurtBremser
what if i want to run a two sample t-test to compare money received for the two groups?
Super Contributor
Posts: 271

## Re: Currency conversion helpppppppp!!!

Posted in reply to s34831850

Can you be more illustrative about two sample t-test?

Which are the two groups on you want to run t-test?

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
• 9 replies
• 295 views
• 0 likes
• 4 in conversation