Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
mutendorf
Regular Visitor

Power BI treating Blank as 0 when filtering

Hello, I am trying to use a field from a dimensional table as a filter in the report. When I use this field as column in the table, the values populate as expected. The error happens when I try to filter to 0. The table returns rows that have no value in the dataset (technically NULLS because there is no actual value in the associated table for these rows). I have discussed this with my team at work and we feel that PBI may have a bug when it comes to this. One solution for a workaround is to use Advanced Filter and select 'is 0' and 'is not blank', but this option is not ideal for our use case. Can someone please help? Screenshot below. Thanks!

mutendorf_1-1714059299328.png

 

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@mutendorf,

 

Since BLANK() = 0 returns TRUE, it can cause unexpected behavior. One approach is to create a custom column "Amount Filter" in Power Query for filtering:

 

if [Amount] = null then "Blank" else [Amount]

 

Results:

 

DataInsights_0-1714085719279.png

 

DataInsights_1-1714085741641.png

 

Additional reading:

https://dax.guide/op/strictly-equal-to/ 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
mutendorf
Regular Visitor

Thanks for responding. The strictly equal to article was helpful and I was able to get a calculated column to work by incorporating IF [column] == BLANK() then 999 else [column]. This then assigns the previous blanks to 999 which can be filtered out. Thanks!

DataInsights
Super User
Super User

@mutendorf,

 

Since BLANK() = 0 returns TRUE, it can cause unexpected behavior. One approach is to create a custom column "Amount Filter" in Power Query for filtering:

 

if [Amount] = null then "Blank" else [Amount]

 

Results:

 

DataInsights_0-1714085719279.png

 

DataInsights_1-1714085741641.png

 

Additional reading:

https://dax.guide/op/strictly-equal-to/ 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.