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
Roym
Helper IV
Helper IV

Show zero instead of blank for cards

I have a lot of cards in my report in various places. Some use measures and some show just numbers that are filtered inside the card itself. Now I have various cards that sometimes, depending on the selection, show (blank). I would prefer to show a '0' instead. I know that for the measures it is possible to do a 'if blank' but as not all cards are using measures I was wondering if there is another way to fix this?

1 ACCEPTED SOLUTION
FPackermanGTA
Advocate I
Advocate I

Hi,

 

I was looking to do this the other day and was able to find a workaround on these forums also.

 

Look in the format options of the card under the paintbrush and expand Category Label then right click on the colour and choose Conditional Formatting.

 

FPackermanGTA_0-1633764745616.png

 

Change the Format by to 'Rules' and choose the field the card is displaying. For the rule choose is blank and change the color to whatever your background colour is so even though the card is displaying blank the rule will kick in and effectively hide the words {Blank}. Although not ideal this was the next best thing I was able to do.

 

FPackermanGTA_1-1633764867714.png

 

 

View solution in original post

9 REPLIES 9
Anonymous
Not applicable

For a simple counter in the card visual, a custom calculated column using an IF statement (expression,0,1) puts a zero in the counter when the sum,min,max,count,or count(distinct) is zero.  

31-60DaysOut = IF('Sheet1'[DaysOut] > 30 && 'Sheet1'[DaysOut] <= 60,1,0)
 
@PowerBI Ideally, the card visual would detect the whole number or decimal format of the field and put a zero instead of the work "Blank".
FPackermanGTA
Advocate I
Advocate I

Hi,

 

I was looking to do this the other day and was able to find a workaround on these forums also.

 

Look in the format options of the card under the paintbrush and expand Category Label then right click on the colour and choose Conditional Formatting.

 

FPackermanGTA_0-1633764745616.png

 

Change the Format by to 'Rules' and choose the field the card is displaying. For the rule choose is blank and change the color to whatever your background colour is so even though the card is displaying blank the rule will kick in and effectively hide the words {Blank}. Although not ideal this was the next best thing I was able to do.

 

FPackermanGTA_1-1633764867714.png

 

 

Niceee, indeed not ideal but this works perfectly as a workaround. Didn't think about this.

In fact, I think it is a great solution because it avoids creating more measures. I'll take it, thanks!

YukiK
Impactful Individual
Impactful Individual

Other than saying 0 if blank, you can also add "+ 0" in your measure.

Your Measure = SUM(Table[Sales]) + 0

Very basic!! Excellent!!! The best answer!!

PC-BI
Frequent Visitor

Thanks @YukiK, this was a perfect and simple solution to resolve this issue 🙂

This is a great solution! Thank You!

parry2k
Super User
Super User

@Roym no other way, you have to use measure and then make it zero in case of blank

 

Measure with Zero = COALESCE ( [Your Measure], 0 )

Follow us on LinkedIn

 

Learn about conditional formatting at Microsoft Reactor

My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

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.