Forum Discussion

Gangasaniravi's avatar
2 years ago
Solved

Grand total not correct

Hi All

 

Matrix table not giving total as per data in visual, in below visual Balnce is calculated measure with some date fileter in dax.In total we need to show only 170 not 200

MMM YYNov-22Dec-22
bucketBalanceBalance
Current 170187
0-30  
31-60  
61-90  
91 and above  
Toatal200220

 

  • Gangasaniravi 

     

    try using sumx instead of just sum for the balance measure 

    ex : 

    sumx( 

    values(tbl_name[col_name]),

    calculate ( sum[tbl_name[balance])
    )

     

    let me know if this works for you .

     

    NB : the total =  193 

    the difference = 193  - 169 = 32 

    so before using sumx(), i would recommend to investigate the reason why the total is adding 32 . ( unless you  know the reason and you want to exlude the 32 , and have the total =  base on the numbers that are displayed in the visual ) 

     

    If my answer helped sort things out for you, i would appreciate a thumbs up πŸ‘ and mark it as the solution βœ…
    It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🀠

2 Replies

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

    Gangasaniravi 

     

    try using sumx instead of just sum for the balance measure 

    ex : 

    sumx( 

    values(tbl_name[col_name]),

    calculate ( sum[tbl_name[balance])
    )

     

    let me know if this works for you .

     

    NB : the total =  193 

    the difference = 193  - 169 = 32 

    so before using sumx(), i would recommend to investigate the reason why the total is adding 32 . ( unless you  know the reason and you want to exlude the 32 , and have the total =  base on the numbers that are displayed in the visual ) 

     

    If my answer helped sort things out for you, i would appreciate a thumbs up πŸ‘ and mark it as the solution βœ…
    It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🀠

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Gangasaniravi 

    You can try the following measure.

    Measure =
    SUMX ( VALUES ( Table[bucket] ), [Balance] )
    

    Best Regards!

    Yolo Zhu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.