Forum Discussion

Ania26's avatar
Ania26
Helper IV
10 months ago
Solved

Total without one colum

Hello,  I would like to create measue which calculates Total for each State but Grand Total shows sum for all States except for values from column A: State A B C D Grand Total Should be  ...
  • danextian's avatar
    10 months ago

    Hi Ania26 

    Assuming your actual data is unpivoted (A, B, C, D are in a single column with another column for their corresponding values), try:

    measure without A in total = 
    IF (
        NOT ( HASONEVALUE ( 'table'[ABCD colummn] ) ),
        CALCULATE ( [your measure], KEEPFILTERS ( 'table'[ABCD colummn] <> "A" ) ),
        [your measure]
    )