Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
na12063
Helper I
Helper I

Convert Currency Conversion with Slicer

Hi, let's say I have two tables. OrderDetail_Table, has 5 days of data transactions in USD, EUR and GBP and Currency_Table 5 days currency exchange data for USD, EUR and GBP.
I want to be able to change(currency) of the total_amount based on the currency slicer and to match the date of the order 

How would you create a connection in the Date Column  as well the currency conversion and get the converted column as Total_Amount(Selected Currency).

 

Similar to this Video but to match the date.

https://www.youtube.com/watch?v=88QSf2fB1Rg&t=2s

 

Here below I created Sample Data in PBIX

https://1drv.ms/u/s!ArgoBkRUwmVklwPKYO6q4t_rEpKs

 

Thanks in advance,

na12063

1 ACCEPTED SOLUTION
v-cherch-msft
Employee
Employee

Hi @na12063 

 

You may try to use 'Unpivot columns' in query editor for Currency table.Link the two tables with date column.Then create CurrencyByLocation columns and 

SelectedCurrency,Total_Amount(Selected Currency) measures.For further,please refer to the attachment.
SelectedCurrency =
CALCULATE (
    SUM ( 'Currency'[Value] ),
    FILTER (
        'Currency',
        'Currency'[Attribute] = SELECTEDVALUE ( OrderDetail[CurrencyByLocation] )
    )
)
Total_Amount(Selected Currency) =
DIVIDE ( SUM ( OrderDetail[Total_Amount] ), [SelectedCurrency] )
Regards,
Cherie
Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-cherch-msft
Employee
Employee

Hi @na12063 

 

You may try to use 'Unpivot columns' in query editor for Currency table.Link the two tables with date column.Then create CurrencyByLocation columns and 

SelectedCurrency,Total_Amount(Selected Currency) measures.For further,please refer to the attachment.
SelectedCurrency =
CALCULATE (
    SUM ( 'Currency'[Value] ),
    FILTER (
        'Currency',
        'Currency'[Attribute] = SELECTEDVALUE ( OrderDetail[CurrencyByLocation] )
    )
)
Total_Amount(Selected Currency) =
DIVIDE ( SUM ( OrderDetail[Total_Amount] ), [SelectedCurrency] )
Regards,
Cherie
Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Dear Cherie,

I appriciate your help on this solution it's working as expected. Is there any way we can add currency symbol to the values to the column Total_Amount(Selected Currency) or I have to create another column with only symbols based on CurrencyByLocation column. 

Please let me know your comments.

Best Regards,

na12063

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.