Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Measure that can return subtotal

Hi There

I have a matrix as below with columns from the table named "Query1".

And I'd like to create a measure that can add a column with the substotal of Order Demand -1 by WWB.

For example, for all material under WWB 100, the measure shall return 25797200 for all rows.

I tried measure like below but only get the same value as Order Demand-1.

Measure = CALCULATE(SUM(Query1[Order Demand -1]),ALL(Query1[WWB]))
Thanks in advance.

 

 

 

 

 

  • Hi,

    Try this measure

    Measure = CALCULATE(SUM(Query1[Order Demand -1]),ALL(Query1[Material]))

5 Replies

  • PC2790's avatar
    PC2790
    Icon for Community Champion rankCommunity Champion

    Does the inbuilt feature of matrix in Subtotal section solve your purpose here?

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks, but perhaps I didn't make myself clear.

      I do not want the subtotal, but want a measure that can return the subtotal by WWB for each row in the matrix.

      Like below.

      WWBOrder Demand-1Measure
      1003201771425797200
       3201771725797200
       ....25797200
  • Hi,

    Try this measure

    Measure = CALCULATE(SUM(Query1[Order Demand -1]),ALL(Query1[Material]))

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks Ashish, it works, never be clear enough about this context thing LOL