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
vishal097
Helper II
Helper II

Zeros Are getting consider as Blank

Hello There,

 

I am working on color coding measure by comparing Actual Vs Target.

If Actual is blank - I don't want color

if Target is blank - I don't want color

if Actual & Target both are blank -  I don't want color

 

This can be achive by mentioning Actual <> blank() && Target <> blank()

but I have some values in target or in actual as 0 and I want to comapre them with respective target to give color but after blank condition it is showing no color.

 

I believe it considering 0 as Blank 

can someone help on how to fixed this issues.

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

Please try somethnig like below.

 

if( Actual == blank() && Target == blank(), blank(), color condition)

 

by using two equal signs, ==, it only catches blank, and it does not catch zero.

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

3 REPLIES 3
AilleryO
Memorable Member
Memorable Member

Hi,

 

You're absolutely right, if you do a test like :

[Value]=0 or [Value]=BLANK() Power BI consider 0 and blank as the same.

To differentiate them you should use :

[Value]==0 or [Value]==BLANK() or ISBLANK( [Value]) 

all of them making a difference between null (blank) and 0.

And you can use NOT to make your test :

NOT ISBLANK( [Actual])

 

Hope it helps, let us know...

Jihwan_Kim
Super User
Super User

Hi,

Please try somethnig like below.

 

if( Actual == blank() && Target == blank(), blank(), color condition)

 

by using two equal signs, ==, it only catches blank, and it does not catch zero.

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Thanks Worked Perfectly 🙂 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.