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, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare 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! 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.

October NL Carousel

Fabric Community Update - October 2024

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