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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
PBI-BOLA
Frequent Visitor

Use currency table to calculate rate to third currency

I have a table like the below

 

Currency_CodeStarting_DateMonthly Average Conversion Rate to GBP
AED01/11/2023 00:004.553310714
AED01/10/2023 00:004.469232258
AED01/09/2023 00:004.552056667
GBP01/11/2023 00:001
GBP01/10/2023 00:001
GBP01/09/2023 00:001
AUD01/11/2023 00:001.911332143
AUD01/10/2023 00:001.916648387
AUD01/09/2023 00:001.928933333
EUR01/11/2023 00:001.147792857
EUR01/10/2023 00:001.151916129
EUR01/09/2023 00:001.160366667
SGD01/11/2023 00:001.673132143
SGD01/10/2023 00:001.665458065
SGD01/09/2023 00:001.688866667
USD01/11/2023 00:001.239860714
USD01/10/2023 00:001.216941935
USD01/09/2023 00:001.23949

 

I'm trying without luck to create a calculated column that would take the monthly to gbp rate and divide it by the monthly rate for USD within the relevant month, trying to do this without the "Calculate" funtion as I know that can cause performance issues. This would allow me to get the direct conversion for each into USD.

My table has been simplified for this question. The actual table would contain rates for each day throughout a month. 

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@PBI-BOLA,

 

Try this calculated column:

 

GBP/USD Rate = 
VAR vStartingDate = 'Currency'[Starting_Date]
VAR vUSDRate =
    MAXX (
        FILTER (
            'Currency',
            'Currency'[Currency_Code] = "USD"
                && 'Currency'[Starting_Date] = vStartingDate
        ),
        'Currency'[Monthly Average Conversion Rate to GBP]
    )
VAR vResult =
    DIVIDE ( 'Currency'[Monthly Average Conversion Rate to GBP], vUSDRate )
RETURN
    vResult

 

DataInsights_0-1701441659585.png

 





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

Proud to be a Super User!




View solution in original post

2 REPLIES 2
DataInsights
Super User
Super User

@PBI-BOLA,

 

Try this calculated column:

 

GBP/USD Rate = 
VAR vStartingDate = 'Currency'[Starting_Date]
VAR vUSDRate =
    MAXX (
        FILTER (
            'Currency',
            'Currency'[Currency_Code] = "USD"
                && 'Currency'[Starting_Date] = vStartingDate
        ),
        'Currency'[Monthly Average Conversion Rate to GBP]
    )
VAR vResult =
    DIVIDE ( 'Currency'[Monthly Average Conversion Rate to GBP], vUSDRate )
RETURN
    vResult

 

DataInsights_0-1701441659585.png

 





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

Proud to be a Super User!




Thank you very much!

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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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