Forum Discussion

Lotfi96's avatar
Lotfi96
Regular Visitor
2 years ago
Solved

Using Calculate function with special conditions

Hello,   I ran in a bit of an issue while trying to write a measure. Here's an example of currencies. Country Currency USA USD UK GBP   What I'm trying to do is calculate the sum ...
  • parry2k's avatar
    2 years ago

    Lotfi96 try this:

     

    Sum = 
    SUMX ( 
        Data, 
        VAR __Factor = IF ( Data[Current] = "USD", 10, 1000 )
        RETURN
            Data[Sales] / __Factor
    )