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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
Anonymous
Not applicable

Currency conversion

Can anyone be help?

Hi everyone.

I have a table with transaction like this:

Rick_ferreira_0-1633604861779.png

 

 and another table with rate of currency per day like this:
 

Rick_ferreira_1-1633604873135.png

 

My client want to have a two slicer:
- Currency 
-Periodo of time

 

They want to select a time period and a currency and have the transaction amount. Power BI needs for the selected date range, read the transaction date and read the rate table and make the conversion. This is very dynamic and I don't see how to solve it.

 

Can anyone be help?

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous 

You may refer to my sample.

Transaction:

1.png

Rate - EUR:

2.png

I create a Currency table by dax to build slicer.

Currency = VALUES('Rate - EUR'[Currency])

Measures:

Basic Measure = 
VAR _Rate = IF(MAX('Transaction'[currency]) = "EUR",1,CALCULATE(SUM('Rate - EUR'[Rate - EUR]),FILTER(ALL('Rate - EUR'),AND('Rate - EUR'[Date]=MAX('Transaction'[Date]),'Rate - EUR'[Currency]=MAX('Transaction'[currency])))))
VAR _EUR = DIVIDE(SUM('Transaction'[Value]),_Rate)
VAR _SELECTCURRENCY = SELECTEDVALUE('Currency'[Currency])
VAR _SELECTRATE = CALCULATE(SUM('Rate - EUR'[Rate - EUR]),FILTER(ALL('Rate - EUR'),AND('Rate - EUR'[Currency] = _SELECTCURRENCY,'Rate - EUR'[Date] = MAX('Transaction'[Date]))))
VAR _SELECTVALUE = _EUR*_SELECTRATE
RETURN
IF(ISFILTERED('Currency'[Currency]),_SELECTVALUE,_EUR)
Value in Select Currency = SUMX('Transaction',[Basic Measure])
What Currency now? = IF(ISFILTERED('Currency'),SELECTEDVALUE('Currency'[Currency]),"EUR")

Build a date range slicer by Date column from Transaction table. Result is as below.

If there is no selection in currency slicer, [Value in Select Currency] measure will show values in rate of EUR. [What Currency now?] will show EUR.

1.png

If there is a selection in currency slicer like USD, [Value in Select Currency] measure will show values in rate of USD. [What Currency now?] will show USD.

2.png

Best Regards,
Rico Zhou

 

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

3 REPLIES 3
vivran22
Community Champion
Community Champion

Hello @Anonymous,

 

Will your currency rate table have multiple records for each currency for a given date?

 

Cheers!

Vivek   

Anonymous
Not applicable

Yes.

Anonymous
Not applicable

Hi @Anonymous 

You may refer to my sample.

Transaction:

1.png

Rate - EUR:

2.png

I create a Currency table by dax to build slicer.

Currency = VALUES('Rate - EUR'[Currency])

Measures:

Basic Measure = 
VAR _Rate = IF(MAX('Transaction'[currency]) = "EUR",1,CALCULATE(SUM('Rate - EUR'[Rate - EUR]),FILTER(ALL('Rate - EUR'),AND('Rate - EUR'[Date]=MAX('Transaction'[Date]),'Rate - EUR'[Currency]=MAX('Transaction'[currency])))))
VAR _EUR = DIVIDE(SUM('Transaction'[Value]),_Rate)
VAR _SELECTCURRENCY = SELECTEDVALUE('Currency'[Currency])
VAR _SELECTRATE = CALCULATE(SUM('Rate - EUR'[Rate - EUR]),FILTER(ALL('Rate - EUR'),AND('Rate - EUR'[Currency] = _SELECTCURRENCY,'Rate - EUR'[Date] = MAX('Transaction'[Date]))))
VAR _SELECTVALUE = _EUR*_SELECTRATE
RETURN
IF(ISFILTERED('Currency'[Currency]),_SELECTVALUE,_EUR)
Value in Select Currency = SUMX('Transaction',[Basic Measure])
What Currency now? = IF(ISFILTERED('Currency'),SELECTEDVALUE('Currency'[Currency]),"EUR")

Build a date range slicer by Date column from Transaction table. Result is as below.

If there is no selection in currency slicer, [Value in Select Currency] measure will show values in rate of EUR. [What Currency now?] will show EUR.

1.png

If there is a selection in currency slicer like USD, [Value in Select Currency] measure will show values in rate of USD. [What Currency now?] will show USD.

2.png

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.