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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
davidanstee
Frequent Visitor

Help with currency conversion using LOOKUPVALUE with Exchange Rate month by month

Hey Everyone, 

 

I hope that anyone can help me with a problem I have when trying to lookup an exchange rate for a transaction on a given month. 

 

I am using an Exchange Rate table as follows:

ExchangeRateTable1.png

 

And I am using a Calculated Coloumn like this:

 

REVENUE_FORECAST_CURRENCYRATETO_USD = 
LOOKUPVALUE (
    'IFS_Currency_Convert'[CONVERSION RATE],
    'IFS_Currency_Convert'[FROM CURRENCY], Revenue_Forecast[Currency],
    'IFS_Currency_Convert'[TO CURRENCY], "USD",
    'IFS_Currency_Convert'[RATE DATE].[Year], Revenue_Forecast[PROJ_CREATED_DATE].[Year],
    'IFS_Currency_Convert'[RATE DATE].[MonthNo], Revenue_Forecast[PROJ_CREATED_DATE].[MonthNo]
)

 

But the results I am getting look like this:

 

PowerBI_Exchange_rate_results.png 

 

As you can see the table to the left, are the transactions with the attempt to pull the currency rate, and the table to the right is a view of the currency table. You will see on many of the results in the transactions, it is doing some kind of sum for the exhange rate? Why is this? What am I doing wrong?

 

Additionally, and annoyingly, the Exchange Rate table that is used by my company does not include the rates used for same currency (e.g. USD to USD = 1 and GBP to GBP = 1). How can I easily add these exchange rates into the table on a Month by Month basis?

1 ACCEPTED SOLUTION
PattemManohar
Community Champion
Community Champion

@davidanstee Could you please check and confirm whether you have multiple entries for same productid in the same month and year, in that case it might sum up the values. Then you need to select "Don't Summarize" option. The lookup formula looks fine. Regarding your last point, USD to USD and GBP to GBP - Anyway you are hardcoding the TO_CURRENCY value to USD (So everything you want to show in USD isn't it) so what's the purpose of having those same from and to currency values in your lookup table. 





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




View solution in original post

5 REPLIES 5
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @davidanstee,

 

As PattemManohar mentioned, please check whether the field [REVENUE_FORECAST_CURRENCYRATETO_USD] added to table visual is summarized by default. If yes, please change it to "Don't summarize".

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
GilbertQ
Super User
Super User

Hi there, I would recommend doing the currency conversion in the Query Editor or source.

Whilst the lookup does work if your dataset is large or becomes large it will become quite slow




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

PattemManohar
Community Champion
Community Champion

@davidanstee Could you please check and confirm whether you have multiple entries for same productid in the same month and year, in that case it might sum up the values. Then you need to select "Don't Summarize" option. The lookup formula looks fine. Regarding your last point, USD to USD and GBP to GBP - Anyway you are hardcoding the TO_CURRENCY value to USD (So everything you want to show in USD isn't it) so what's the purpose of having those same from and to currency values in your lookup table. 





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




@PattemManohar In regards to the second point...

 

Currently the REVENUE amount field, is in mixed currencies dependant on where business was transacted (its an older platform that is not multi-currency aware). What I eventually want to get to, is to be able to choose the "OUTPUT" currency based on a Selection. And therefore in my exchange table I will need everything inclusive. Today the table from the system doesnt have GBP to GBP or USD to USD or EUR to EUR

OMG, I cannot beleive I missed something so obvious!

 

Couldnt see the wood for the trees!

 

Thanks for pointing out my silly mistake 🙂

Helpful resources

Announcements
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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.