Forum Discussion
Need help on Currency conversion
Hi,
I have table like below in that need to convert currency based on country.
| Country_name | Currency | Currency in country_name | to usd |
| Taiwan | TWD | 400 | |
| Greater china area | HKD | 500 | |
| Greater china area | CNY | 600 |
I need a m-query/dax expression to convert above country currency to usd.
can someone help me please.
Thanks in advance
hi, Anonymous
refer these article CLICK HERE- Anonymous2 years ago
Hi Anonymous ,
Please follow these steps:
1.Create a table for the dollar exchange rate: Table (2).
2.Create a link between the two tables.
3.Create metrics and convert them based on the current month's exchange rate.
Measure = var _rate = MAXX( FILTER(ALL('Table (2)'),MONTH(TODAY())=MONTH('Table (2)'[Month])&&YEAR(TODAY())=YEAR('Table (2)'[Month])), 'Table (2)'[Dollar exchange rate]) return CALCULATE(MAX('Table'[Quantities]) * _rate)4.The results are shown below.
If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 Replies
- Dangar332
Resident Rockstar
hi, Anonymous
refer these article CLICK HERE - danextian
Super User
Hi Anonymous
You will need a separate table that contains the conversion factor for its currency. The formula to access the conversion rate depends on whether there is just one conversion for each currency (no separate ones for each month) and then divide or multiply the local currency amount by the conversion factor.
- AnonymousNot applicable
Hi Anonymous ,
Please follow these steps:
1.Create a table for the dollar exchange rate: Table (2).
2.Create a link between the two tables.
3.Create metrics and convert them based on the current month's exchange rate.
Measure = var _rate = MAXX( FILTER(ALL('Table (2)'),MONTH(TODAY())=MONTH('Table (2)'[Month])&&YEAR(TODAY())=YEAR('Table (2)'[Month])), 'Table (2)'[Dollar exchange rate]) return CALCULATE(MAX('Table'[Quantities]) * _rate)4.The results are shown below.
If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- pratyashasamal
Memorable Member
Hi Anonymous ,
You can follow this youtube video , this quite similar to your usecase :-
https://www.youtube.com/watch?v=IDJ05Zp3Gvo
Hope this is helpful.
Thanks,
Pratyasha Samal
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C