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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Jhadur
Helper I
Helper I

Show 0 instead of blank

I need this card to show a 0 instead of a blank when the green piece of the pie chart is selected.

 

The card is set up as follows.

 

Jhadur_0-1721229764058.png     Jhadur_1-1721229801375.png

 

Jhadur_2-1721229838346.png     Jhadur_3-1721229872611.png     Jhadur_4-1721229995573.png     

 

The overall status column has this data. 30 = Red - 20= Amber - 10 = Green

 

Jhadur_6-1721230099020.png

 

 

 

5 REPLIES 5
anmolmalviya05
Super User
Super User

Hi @Jhadur, Hope you are doing good!

You can do it by simply creating a measure to calculate count of overall status.
Please use the below measure:

Count of overall status = Count('Projects'[Overall Status])+0
Add this measure in your card and it will show 0 in place of blank


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


Anonymous
Not applicable

Hi @Jhadur ,

Have you solved your problem yet? If so, you can mark the correct answer as solution.

Best Regards,

Xianda Tang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi @Jhadur ,

Thank you for @Greg_Deckler answer , and I have other suggestions for you:

Below is my table:

vxiandatmsft_0-1721280750870.png

The following DAX might work for you:

Measure = IF(SELECTEDVALUE('Table'[Color]) = "Green" , 0 , BLANK())

The final output is shown in the following figure:

vxiandatmsft_1-1721280797622.png

Best Regards,

Xianda Tang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Greg_Deckler
Super User
Super User

@Jhadur Not sure what implicit aggregation you are using, count, average, ? But, in any case, create a measure to duplicate that and +0



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler 

 

Thanks Greg. I am doing a count of the Overall Status shown above. I am new to Power BI. How would I write the meaure to count all of the overall status but only show 0 if the overall status is Green (10)?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.

Top Kudoed Authors