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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Par37
Regular Visitor

Currency conversion with currency and year filters

I have 4 tables downloaded from the bank regarding exchange rates (CurrencyRates_2020,CurrencyRates_2021, etc.) in which there are columns with currencies, months and exchange rates, in the finance table there are columns amounts, inflows, outflows, date. I also added a table that contains currency column that I used to create the filter.

 

What I would like to do is create a measure for amounts, outflows and inflows that will convert to the currency selected by the filter in the year selected by the filter. I've only written the part for the selected currency

 

Par37_0-1681397260376.png

 

, but I don't know how to add a date filter. I would like it to fetch me data from the file "CurrencyRates_2021" when I select the date 2021 etc.

 

I wanted to add at the beginning 

IF(AND(ISFILTERED('Currency'[Currency]),ISFILTERED('Consulting Finance'[Year]) [...]
 
But I have no idea what to write next.
 
3 REPLIES 3
johnt75
Super User
Super User

I think it would simplify matters considerably if you merge the tables together in Power Query so that you only have 1 table to get values from.

I thought about it, but these are tables downloaded from the bank's website, so the data from 2023 will be updated. I'm not sure if I merge these tables into one, will the data update.

As long as you set a scheduled refresh in the Power BI service then they will update. You could also choose not to reload the older versions, which won't change, by right clicking on the query in Power Query editor and unticking "include in report refresh".

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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