Forum Discussion
Default filtering table with null and zero values: when click "0" it lists all 0's AND null items
- 5 years ago
Hi EvelynBI
Ah, OK. When I entered the data I don't think it did the auto type conversion. Can't quite remember.
The behaviour you are seeing is that Blank is being treated as 0, you can read more on this here
I created a measure to check for the count of zeroes in the table
ZeroCount = CALCULATE(COUNTROWS('Table'), FILTER('Table','Table'[Column1]=0))and the result is 6
But if you count the number of blanks
BlankCount = CALCULATE(COUNTROWS('Table'), FILTER('Table',ISBLANK('Table'[Column1])))the result is 4
When you filter for the value 0, the Blanks are cast/treated as 0 so you see all rows in the table that are either 0 or Blank.
When you filter for Blank, you only see Blank. 0 isn't treated as Blank.
And of course when you filter for 1 you only see 1's.
Also, if you convert the values column containing the blanks/1/0 to True/False, Blank and 0 are cast to False and 1 to True.
Download my PBIX if you want to see the measures.
Regards
Phil
More than likely this is expected behavior. Power BI will aggregate as much as you let it ("Don't summarize" has a slightly different meaning as it only applies to number columns)
For #6 do a count of index instead of count of column1
For #10 you will want to refer to the way (blank) values are blended into visuals in the absence of relationships/joins.