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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Fraukje
Advocate II
Advocate II

Use report filter in calculated column IF statement

 

Capture.JPGI have a bunch of transactions in different currencies (columns TransactionCurrencyCode and TransactionAmount), and I have a Currency table that is related using the TransactionCurrencyCode. The currency table has also RateToDollar (not in picture) and RateToEuro columns that give the conversion rate to Dollar and Euro respectively. See the picture for the idea.

 

 

 

I have created another table named CurrencyFilter, that has no relation to either former tables and has a CurrencyCode that is set as a report filter.

 

What I want is for the user to select either 'Euro' or 'Dollar' in the report filter, and then all the transactions (that are originally in numerous different currencies) to be converted to euro or dollar respectively.

 

I figured out that I can obtain the value of the Currency report filter usingthe measure

CurrencyFilter = IF(LASTNONBLANK('CurrencyFormat'[Code], 1) = "USD", "USD", "EUR")

However, when I try to use this measure in a calculated column, for some reason it keeps returning me the rate in Euros always (so the IF statement for some reason always returns TRUE), see my calculated column here:

 

TransactionAmountConverted = CALCULATE(VALUES(Transactions[TransactionAmount]) * (IF([CurrencyFilter] = "EUR", VALUES('Currency'[RateToEuro]), VALUES('Currency'[RateToDollar]))))

I feel like it is something really easy that I am doing wrong, but after looking for a while I have to admit that I do not see it myself. Any help or tips here?

1 REPLY 1
Anonymous
Not applicable

@Fraukje,

Please follow the instructions in the video and blog below to handle currency. If you still get issues, please help to share dummy data of your table.

Change currency using a slicer 
Currency conversion in DAX for Power BI and SSAS

Regards,
Lydia

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors