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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
dineshj
Helper I
Helper I

Excluding Blanks in a Column

Hi, I have the below column I am creating in PowerBI dekstop based on another column. If the value in the cell is 0 give me On Time result. If less than 0, give me Early result and great than 1, late result. 
Final Due= if('Source1'[Final Due 1] = 0, "On Time",if('Source1'[Final Due 1] < 0, "Early", "Late"))
 
However, the blanks are showing up as On Time as well. How do I exclude the blanks so they don't show up?
1 ACCEPTED SOLUTION

@dineshj ,
I would have to see your data, however, you can implement ISBLANK check first and modify the blanks into something else that you can then filter out.

SWITCH(
TRUE(),
ISBLANK(Source1[Final Due 1]), "No value",
Source1[Final Due 1] = 0, "On Time",
Source1[Final Due 1] < 0, "Early",
"Late")


 






Any kudos or recognition appreciated. To learn more on the topic, check out my blog and follow me on LinkedIn.

View solution in original post

3 REPLIES 3
vojtechsima
Super User
Super User

Hi, @dineshj 
if you use multiple conditions, don't use IF but SWITCH:

 

SWITCH(
TRUE(),
Source1[Final Due 1] = 0, "On Time",
Source1[Final Due 1] < 0, "Early",
"Late")

 

and then in the Visulasiation panel and its filter, just Select all except "Blank".

Something like this:

vojtechsima_0-1646230545003.png

 






Any kudos or recognition appreciated. To learn more on the topic, check out my blog and follow me on LinkedIn.

Hi @vojtechsima , I used the Switch function but still getting the same results. The blanks are still showing up as "On time". I looked in the transform data query and see that the original column has blanks as null.

I am not sure why it's still taking the blanks as 0s. 

@dineshj ,
I would have to see your data, however, you can implement ISBLANK check first and modify the blanks into something else that you can then filter out.

SWITCH(
TRUE(),
ISBLANK(Source1[Final Due 1]), "No value",
Source1[Final Due 1] = 0, "On Time",
Source1[Final Due 1] < 0, "Early",
"Late")


 






Any kudos or recognition appreciated. To learn more on the topic, check out my blog and follow me on LinkedIn.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.