Forum Discussion

bsz412's avatar
bsz412
Helper III
4 years ago
Solved

matrix visual hiding subtotal value for text column - issue when filtering

hello, 

 

I have this matrix visual: 

 

behind the ETIM class category I have the following measure, to hide the subtotals:  

 

ETIM class category for matrix =

IF(
ISFILTERED(
globalproduct[ETIM_class]
),
VALUES(
globalproduct[ETIM_class_cat]
),
BLANK()
)
 
This works perfectly, but if I want to filter out the rows where total sellout is blank or zero, this formula brakes, and I get the following error message: 

any hints how I could fix this?

thank you

 

  • bsz412 

    Try it like this instead.

     

    ETIM class category for matrix =
    IF (
        ISFILTERED ( globalproduct[ETIM_class] ),
        MAX ( globalproduct[ETIM_class_cat] ),
        BLANK ()
    )

    Or maybe use HASONEVALUE.

    ETIM class category for matrix =
    IF (
        HASONEVALUE ( globalproduct[ETIM_class] ),
        MAX ( globalproduct[ETIM_class_cat] ),
        BLANK ()
    )

     

2 Replies

  • bsz412 

    Try it like this instead.

     

    ETIM class category for matrix =
    IF (
        ISFILTERED ( globalproduct[ETIM_class] ),
        MAX ( globalproduct[ETIM_class_cat] ),
        BLANK ()
    )

    Or maybe use HASONEVALUE.

    ETIM class category for matrix =
    IF (
        HASONEVALUE ( globalproduct[ETIM_class] ),
        MAX ( globalproduct[ETIM_class_cat] ),
        BLANK ()
    )

     

    • bsz412's avatar
      bsz412
      Helper III

      hi, thanks, the hasonevalue version fixed it! I tried the MAX solution before, and interestingly what happens is that the subtotal does not disappear when I use MAX and I filter out not blanks of the total sellout: 

       

      But HASONEVALUE is giving the required outcome! THANK YOU!