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: 9,548

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

View solution in original post


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

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?

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

Trusted Advisor
Posts: 1,822

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

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: 9,548

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