Forum Discussion

Dimitris_Kats's avatar
4 years ago
Solved

Fixed Exchange Rate

Hello Everyone,   I have a small problem...i can think of a solution but I am not sure if its the best one so I will need your advice about that.   I have a table with sales, cost and profit per ...
  • Jihwan_Kim's avatar
    Jihwan_Kim
    4 years ago

    Hi,

    I tried to create it in the next page in the attached pbix file.

    please check the below picture and the attached pbix file.

     

     

    Sales currency slicer: =
    SWITCH (
        SELECTEDVALUE ( 'Currency Select'[Currency select] ),
        "Local", IF ( HASONEVALUE ( Sales[Country] ), SUM ( Sales[Sales (Local Currency)] ) ),
        "Euro",
            SUMX (
                sales,
                CALCULATE (
                    DIVIDE (
                        SUM ( Sales[Sales (Local Currency)] ),
                        LOOKUPVALUE (
                            ExchangeRate[Exchange Rate],
                            ExchangeRate[Country], SELECTEDVALUE ( Sales[Country] )
                        )
                    )
                )
            )
    )