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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Convert multiple currencies to USD using multiple currency Fx Table with missing weekend/other dates

I have a table that has different currency values. I am trying to add a new measure that will convert just the total currency values to US $.  I will not be using a conversion table but will put the exchange rate into the dax formula for each differeny currecy. I need help in the creating of the DAX stament that will allow me to do this. Thanks

 

Currency.jpg

 

 

 

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

Hello @Anonymous ,

You can do this with a SUMX and SWITCH against your data table.

SCRAP_COST USD =
SUMX (
    Table,
    Table[SCRAP_COST] *
        VAR RowCurrency = Table[CURRENCY]
        RETURN
            SWITCH (
                TRUE (),
                RowCurrency = "USD", 1,
                RowCurrency = "GBP", 1.26992,
                RowCurrency = "MXN", 0.5250859,
                1
            )
)

View solution in original post

1 REPLY 1
jdbuchanan71
Super User
Super User

Hello @Anonymous ,

You can do this with a SUMX and SWITCH against your data table.

SCRAP_COST USD =
SUMX (
    Table,
    Table[SCRAP_COST] *
        VAR RowCurrency = Table[CURRENCY]
        RETURN
            SWITCH (
                TRUE (),
                RowCurrency = "USD", 1,
                RowCurrency = "GBP", 1.26992,
                RowCurrency = "MXN", 0.5250859,
                1
            )
)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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