Forum Discussion

StefanoT1982's avatar
StefanoT1982
Regular Visitor
9 months ago
Solved

Sumif of multiple corresponding values

Imagine I have this simple physical table: CHANNEL CUSTOMER SALES RETAIL A 5 RETAIL B 2 DISTRIBUTORS B 2 DISTRIBUTORS C 1   (note that CUSTOMER B has 2 different corres...
  • jgeddes's avatar
    9 months ago

    Maybe this measure will work for you.

    Measure = 
    var _chTable = 
    SELECTCOLUMNS('Table',"__channel", [CHANNEL])
    RETURN
    SUMX(
        FILTER(ALL('Table'), 'Table'[CHANNEL] IN _chTable),
        [SALES]
    )