Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Subtotal - Dax Formula

Hello,

I'm looking to create a measure which will give me the total for each contract so that when I apply a filter I get the correct subtotal.
For the moment the subtotal takes the Total of all contracts which is not correct. Every hint is highly appreciated.

Contract value =
VAR _A =
SUMMARIZE('AX AG$Service Contract Header','AX AG$Service Contract Header'[Contract No_], "Customer No_",SUM('AX AG$Service Contract Header'[Annual Amount]))
RETURN
SUMX ( _A,[Contract No_])

 

 

2 Replies

  • Anonymous , You should sum Amount ??

    Contract value =
    VAR _A =
    SUMMARIZE('AX AG$Service Contract Header','AX AG$Service Contract Header'[Contract No_], "Customer No_",SUM('AX AG$Service Contract Header'[Annual Amount]))
    RETURN
    SUMX ( _A,[Customer No_])
    • Anonymous's avatar
      Anonymous
      Not applicable
       
      I would need to get the amount per each contract and not the sum of the amount by Debtor.
      Contract value =
      VAR _A =
      SUMMARIZE('AX AG$Service Contract Header','AX AG$Service Contract Header'[Contract No_], "Contract No_",SUM('AX AG$Service Contract Header'[Annual Amount]))
      RETURN
      SUMX ( _A,[Contract No_])