Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi
I'm looking for a measure to show 0 instead of blank on my Power BI card visual and also change the text colour regardless if the amount is 0 or more. The issue is my data is text format and i can't change it to number as the column only contains the word "missing" and the card is counting the rows which have that text.
What I'm looking for it a measure that can do this:
If the count = "blank" then show 0 in orange OR if the count is more than 0 then show the count in orange.
I am very new to measures, so if you could please repsond with the exact measure I need, that would be awesome 🙂
thanks in advance 🙂
Solved! Go to Solution.
Hi @siddrow ,
You can refer to the following test procedure:
M_ =
var sel = SELECTEDVALUE('Slicer_'[Category])
return IF(MAX('Table'[Category])=sel,sel,"0")
Also didn't understand your need to show the orange color, but you can probably refer to the following screenshot:
Measure =
var sel = SELECTEDVALUE(Slicer_[Category])
return IF(MAX('Table'[Category])<>sel,0,1)
If the problem is still not resolved, can you further describe your requirements and provide relevant image information and screenshots of the desired results?
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @siddrow ,
You can refer to the following test procedure:
M_ =
var sel = SELECTEDVALUE('Slicer_'[Category])
return IF(MAX('Table'[Category])=sel,sel,"0")
Also didn't understand your need to show the orange color, but you can probably refer to the following screenshot:
Measure =
var sel = SELECTEDVALUE(Slicer_[Category])
return IF(MAX('Table'[Category])<>sel,0,1)
If the problem is still not resolved, can you further describe your requirements and provide relevant image information and screenshots of the desired results?
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @siddrow ,
Use a measure like this
Please accept this as a solution if your question has been answered !!
Appreciate a Kudos 😀
Thanks for your quick reply, I appreciate it! 🙂
I don't think this one will work as I already have a slicer. The slicer is for different mine sites, so once clicked, it updates the cards to only show what is outstanding for that particular site. Would there be another way to do the measure?
Not sure about your query ...but if the count of the column is blank irrespective of what you select in the slicer this measure should work. Can you check and confirm on the same ?
Hi
Sorry this doesn't really answer my question. I need the full measure for both statements i am trying to do.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
62 | |
61 | |
55 | |
38 | |
27 |
User | Count |
---|---|
83 | |
61 | |
45 | |
41 | |
39 |