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

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.