Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Loop all values of a variable

Hi all!

 

I need to apply a calculation in dax to each category of a variable and I need to sum the result of every calculation in every step to a get the final result. I could apply the same calculation in a dax formula, but the variable have 1000 different categories and is not possible to calculate manually.

 

Anyone can help me, please?

 

Thanks a lot 🙂

1 Reply

  • You can create a measure along the lines of

    Total Measure = SUMX(
    ADDCOLUMNS( SUMMARIZE( 'Table', 'Table'[Category]), "@val", [Your measure]),
    [@val]
    )