Forum Discussion

apollo89's avatar
apollo89
Helper II
8 years ago
Solved

SQL CASE Statement to DAX Measure

Hi All,   Need help to replicate the below Case statement into a DAX measure:   SUM(         CASE                 WHEN VALUE_TYPE = '070' AND VALUE_TYPE_DETAIL = '06' THEN AMOUNT              ...
  • jmalone's avatar
    jmalone
    8 years ago

    Yes, sorry I misunderstood your goal. Try this, it should perform much better as well.

     

    TEST =
    CALCULATE (
        SUM ( 'TableName'[Amount] ),
        'TableName'[VALUE_TYPE] = "070",
        'TableName'[VALUE_TYPE_DETAIL] = "06"
    )