Forum Discussion

L_F's avatar
L_F
Regular Visitor
2 years ago
Solved

Slicer showing zero values

I am trying to create a matrix on Power BI where I show rows with zero values when there is no slicer applied as shown:   However, I don’t want to show all the rows as zero when there is a fi...
  • Gabriele_hbto's avatar
    2 years ago

    Hi,

    you just need to make a measure to check if something on a slicer is selected and if your expression is = 0, like this:

     

    Measure = IF(and(HASONEFILTER(dimension table used as filter),ISBLANK(experssion used to make the count)),1,0)

     

    Then in your visualization (matrix) you put this new measure in the filter and you put it's not = 1

     

    I aspect isblank to work with zero values, but if not, you can put "your count measure = 0" instead of isblank(yourcountmeasure)

    Please mark accepted solution.

    Good day