Forum Discussion

Gavroche97's avatar
Gavroche97
Frequent Visitor
3 years ago
Solved

Create a column that gives conditionnal sum

Hi,   I would like to create a column that would give the sum of a column for each occurences of another column. Exemple: Cat   Value   SumColumn A       3              4       A       1       ...
  • Jihwan_Kim's avatar
    3 years ago

    Hi,

    Please check the below picture and the attached pbix file.

    It is for creating a new column by writing DAX.

     

     

    Sum Column =
    SUMX (
        FILTER ( Data, Data[Category] = EARLIER ( Data[Category] ) ),
        Data[Value]
    )