Forum Discussion
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 filter applied. I would only like to show the applicable rows. Currently, it is shown as below:
Is this possible in Power BI? I also will be adding more slicers for different geographies.
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
1 Reply
- Gabriele_hbtoHelper II
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