Forum Discussion

Ewo's avatar
Ewo
Frequent Visitor
6 years ago
Solved

Problem With SUMX Filters

Hi,   I have some problem with SUMX function.  I want to sum usd amount (Discount / USDRate) when i select to different countries with different currency. So... I have data like this : And ...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi Ewo ,

     

    Thanks for the clarifications.

     

    Please use below measures.

     

     

    Values =

    Var __DistinctCountofCountries = CALCULATE(COUNTROWS(VALUES('DIM-Country'[Currency])),ALLSELECTED('DIM-Country'[Name]))

    return

    IF (__DistinctCountofCountries > 1 , SUMX(OrderTable,(DIVIDE(SUM(OrderTable[Discount]),SUM(OrderTable[USD Rate])))), SUM(OrderTable[Discount]))
     
     
     
    Pull Data in a Matrix Visual.
     
     
     
    Regards,
    Harsh Nathani
     
    Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!!