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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
TheBaz_57
Frequent Visitor

Find fx rate and convert amount to local currency from different table.

Hi all,

 

I seek your help once again.

 

I have two tables as follows:

#1

NameAmount in USDLocal CurencyDateRelationship column
Tom5000GBP25/03/2024GBP-25/03/2024
Peter57GBP10/02/2024GBP-10/02/2024
Sam457GBP16/01/2024GBP-16/01/2024
Tom 16GBP02/02/2024GBP-28/02/2024
Peter 150GBP03/02/2024GBP-03/02/2024
Sam877GBP02/04/2024GBP-02/04/2024

 

#2

DateCurrencyXchrateRelationship column
01/02/2024AUD0.58AUD-01/02/2024
01/02/2024GBP1.02GBP-01/02/2024
02/02/2024AUD0.69AUD-02/02/2024
02/02/2024GBP1.05GBP-02/02/2024
03/02/2024AUD0.63AUD-03/02/2024
03/02/2024GBP1.002GBP-03/02/2024
04/02/2024AUD AUD-04/02/2024
04/02/2024GBP GBP-04/02/2024
05/02/2024AUD AUD-05/02/2024
05/02/2024GBP GBP-05/02/2024

 

A relationship has been created based on the relationship columns. 

 

then in PBI I have a matrix like this

 

NameMinimum AmountMinimum amount dateRateMinimum amount in Local ccy
Tom1628/02/2024  
Peter5710/02/2024  
Sam45716/01/2024  

 

What I need to find is the rate when the minimum amount occured and then get the amount in local ccy. 

 

For the rate I have tried the following but doesn't work:

Rate =
VAR _minQty = MIN('#1'[Amount in USD])
VAR _minDate = CALCULATE(
    MIN('#1'[Date]),'#1'[Amount in USD] = _minQty)
VAR _rate = CALCULATE(
    MIN('#2'[Xchrate]= _minDate)
RETURN _rate)
 
Thanks fo the help
3 REPLIES 3
Anonymous
Not applicable

Hi, @TheBaz_57 

Have you solved your problem? If so, can you share your solution here and mark the correct answer as a standard answer to help other members find it faster? Thank you very much for your kind cooperation!

 

Best Regards

Yongkang Hua

Greg_Deckler
Community Champion
Community Champion

@TheBaz_57 If the two tables are related you should just have to do an aggregation on each column and multiply them together. Maybe I'm not understanding something but hard to test as the sample data doesn't include the related rows for the currency conversion.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
TheBaz_57
Frequent Visitor

 why my tables look so crappy 🙄

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.