Desktop productivity for business analysts and programmers

Currency conversion helpppppppp!!!

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 5
Accepted Solution

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?

 Screen Shot 2017-06-02 at 6.58.23 PM (2).png


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

Re: Currency conversion helpppppppp!!!

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

View solution in original post


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

Re: Currency conversion helpppppppp!!!

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
Occasional Contributor
Posts: 5

Re: Currency conversion helpppppppp!!!

you mean this data right?

Screen Shot 2017-06-02 at 7.14.15 PM (2).png

Trusted Advisor
Posts: 1,459

Re: Currency conversion helpppppppp!!!

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: 259

Re: Currency conversion helpppppppp!!!

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!!!

Screen Shot 2017-06-02 at 7.14.15 PM (2).png

 

this one right?

using left join? 

and then using rate*the amount

Super User
Posts: 7,386

Re: Currency conversion helpppppppp!!!

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
Occasional Contributor
Posts: 5

Re: Currency conversion helpppppppp!!!

got it!!! thxs
Occasional Contributor
Posts: 5

Re: Currency conversion helpppppppp!!!

what if i want to run a two sample t-test to compare money received for the two groups?
Super Contributor
Posts: 259

Re: Currency conversion helpppppppp!!!

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
  • 228 views
  • 0 likes
  • 4 in conversation