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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
Virtual_Ames
Microsoft Employee
Microsoft Employee

How to deal with a "(BLANK)" value in a card visualization

My dashboard showed "(BLANK)" as the value in a card visualization - when I really wanted to see "0".

 

Is there a best practice to deal with this, or a simple way to adjust this?  

 

Here is my current solution.

 

Note: This does not seem to be a data type issue. The card is calling on a measure that is calculated as follows:

 

          Total CRs that have moved to P = CALCULATE([Total CRs - for calculations], 'Release_CRs_Systems (CRs Moved Only)'[Friendly System Name] = "P")

 

2) The data type for "Total CRs - for caculations" is "Whole Number" 

3) [Total CRs - for calculations] is a SUM function - type "Whole Number"

 

CURRENT SOLUTION:

 

Create a new measure that evaluates [Total CRs that have moved to P] and uses IF(ISBLANK)

    

     DISPLAY CALC FOR CR IN P =

        IF( ISBLANK('Release_CRs_Systems (CRs Moved Only)'[Total CRs that have moved to P])
        , 0
        , ( 'Release_CRs_Systems (CRs Moved Only)'[Total CRs that have moved to P]))

 

***** 

 

Can anyone provide a more elegant solution?

46 REPLIES 46
Anonymous
Not applicable

Create a simple Measure.

A measure Is just like a column in the data which you can add logic expression.

My problem was counting rows and then the output was blank.

I solved by;                

          Display Measure = IF(ISBLANK(COUNT(Issues_List[Title])),0,COUNT(Issues_List[Title]))
This measure is checking if COUNT(Issues_List[Title]) = Blank, give output 0
Otherwise returns Counts.

I have done it this way as well.

Anonymous
Not applicable

Hi, 

You can hide the blank value using a Conditional Formatting rule on the Callout Value. The rule is 'if blank' then select the same color as the card or canvas background. 

I have created a video tutorial on how to create the conditional rule: https://youtu.be/Xsmbfpa4oCA

biancagilly_1-1652137235851.png

 

 

This only works if you have a singular color background/fill. Is there a solution to this if you have a gradient fill background? I'd like to simply display nothing for the value instead of the text (Blank) in the card.

garyhumphreys
Regular Visitor

Hi, I cant say its a great solution, but I found that applying a conditional formatting to the 'Callout value' solved it for me. 

 

for a card Visual: --> Format Visual --> Callout Value --> colour (fx)

Then set Format style to Rules, field based on whatever column you are counting from, summarization: Count-->  and set 2 rules: 

1: If Value Is blank --> set the text colour to the same as the background it is on

2: if value > 0 Number and < 10000000 Number -->  then colour to whatever colour you want the text when it isnt 0/blank

 

This is how I do it as well.  I have found it to be the least complicated and straight forward approach.  I agree it seems as thought this could just be a setting in Power BI.  Also, I have only applied the first (Is Blank) rule above without the 2nd rule and it seems to work just fine.

jpanzeca_0-1650978760224.png

 

I agree, this has saved me from recreating all my output values as measures which I don't think should be necessary. 

I applied the second rule in my case as without it the text colour default to Black (for me it did at least), where as I needed mine to be white text.

sweetstar
Advocate I
Advocate I

Thanks, It works. But I have to say this is so stupid. Why the hell is power bi missing so many features.

cesaro
Microsoft Employee
Microsoft Employee

Use the Card (new) visual in Power BI inbox visualizations. In this new visual, you can customize to achieve this "0" value (or any custom value desired) by following configuration in Format Visual section:

 

Visual tab > Callout Values > Values > Show blank as: 0

Anonymous
Not applicable

Generally i agree with you. It looks really awkward

yosiasz
Advocate I
Advocate I

For the card(s) with (blank), go to Data label 

 

1. Right click on color of the Data label 

2. Choose conditional formatting

3. on Format By drop down choose Rules

4. on Base on field choose the field that is used for the card in question

5. Choose appropriate Summarization you want (I chose Sum)

6. Under Rules select drop down if value and choose is blank 
    here is the trick. my cards are for heat map with 5 by 5 cards for a total of 25

    quadrant 1x1 is green, so for that card my choise is

    is value = is blank so I choose color gree which hides the Data Label of (Blank)

 

Anonymous
Not applicable

Great idea! Thank you!

This worked perfectly for me.

Anonymous
Not applicable

If I use the card visual in relation to 'gender', I am having issues solving the blank dillemma because there is no zero value in my data, its either male or female. On my dashboard, when I click the male icon the female icon will appear as blank and vice versa. Ideally when I click on the male icon I would like the female icon to appear as "N/A" or "Zero" is anyone able to help me with this issue I am having, any help is greatly appreciated 🙂

Anonymous
Not applicable

Similar issue here, dealing with non-numeric values. 

 

It'd be nice if you could conditionally format the card, so if it have no data to present, I can conditonal the background color and text color as same, creating the illusion that nothing is presented on the card. 

 

Anonymous
Not applicable

Just add + 0 after your measure for e.g. "Your Measure" + 0.

This generally works for me but didn't with my gauge visual. Might be user error.

nmck86
Post Patron
Post Patron

You could go to edit queries and change blanks to 0 if that would not mess up any other formulas. It is edit queries and then go to the column and “replace values” leave the top blank as it is a blank field and then the replace with field you can put in 0.
sewaktamang
Frequent Visitor

Hi even though it seems you have solved this issue , this might be helpful for you to understand the scenario

http://powerbidax.com/how-to-deal-and-remove-blank-and-nan-value-in-power-bi/

aarikc17
Advocate I
Advocate I

Has someone created a suggestion to add functionality to the fields to add a 0 if blank? Creating a measure for every card is too excessive and limits functionality......

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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