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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
LandShark
Employee
Employee

KPI Indicator shows null when the data value is actually 0

Hello, I'm trying to get a KPI Indicator visual to display a current value of 0%. It just shows a null value instead. The odd thing is that I have no null values in my data. The trending line itself displays properly so this is odd.  The sample on the left is fine. It's the one of the right that's the issue. Any thoughts? Thanks!

debug SNAG- 8-22-2020 10.21.50 AM.jpg

 

Query:

=====================================================

select Date='2020-08-21', CollectionName='debug', Month1=0.16
union
select Date='2020-08-22', CollectionName='debug', Month1=0.00

 

 

 

1 ACCEPTED SOLUTION

Problem solved.

 

I created a new pbix file from scratch with nothing other than a table with data and a default KPI Indicator. Now the zero appeared in the visual with no problem. Hmm....

 

SNAG- 8-23-2020 4.18.01 PM.jpg

 

So I must have basically broken the visual. I looked the custom format and there was the issue. When I remove the format, the zero appeared. 

SNAG- 8-23-2020 4.45.21 PM.jpg

 

I changed the Custom format field from #% to 0% and now the value of zero with a percent sign as a suffix appears when the value is 0. 

SNAG- 8-23-2020 4.40.32 PM.jpg

 

When the value is greater than 0, the data is still displayed exactly as before, which was always fine. 

SNAG- 8-23-2020 5.10.21 PM.jpg

 

Thanks to pranit828  for your help. I appreciate all of your suggestions!

 

Landshark

 

 

View solution in original post

6 REPLIES 6
pranit828
Community Champion
Community Champion

HI @LandShark 

I would use 

FORMAT([Measure],"#.00")





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile

Problem solved.

 

I created a new pbix file from scratch with nothing other than a table with data and a default KPI Indicator. Now the zero appeared in the visual with no problem. Hmm....

 

SNAG- 8-23-2020 4.18.01 PM.jpg

 

So I must have basically broken the visual. I looked the custom format and there was the issue. When I remove the format, the zero appeared. 

SNAG- 8-23-2020 4.45.21 PM.jpg

 

I changed the Custom format field from #% to 0% and now the value of zero with a percent sign as a suffix appears when the value is 0. 

SNAG- 8-23-2020 4.40.32 PM.jpg

 

When the value is greater than 0, the data is still displayed exactly as before, which was always fine. 

SNAG- 8-23-2020 5.10.21 PM.jpg

 

Thanks to pranit828  for your help. I appreciate all of your suggestions!

 

Landshark

 

 

Greg_Deckler
Super User
Super User

@LandShark - Is it just the KPI visual that is doing this or does any visual do this? You might be able to get around this by changing your measure to be:

 

VAR __Calc = <some calculation>

RETURN IF(ISBLANK(__Calc),0,__Calc)

 


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

last post deleted as the preview I mentioned is older than what is currently released. Ugh

 

@LandShark 

You can set a custom format in the modeling pane of the model. Select the measure and you can find the custom format options for the measure under the "Properties" pane.

(Apologies since the following image is from a different thread. Yet you can see that you can set a custom format for both positive and negative values in a measure - the yellow highlight in the image is for the expression for negative values)

3 modeling pane.JPG


Another option is just to add a 0 to the measure itself:

measure for 0% = [your measure] + 0





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Hi Greg!

 

 

I switched the visual from "KPI Indicator" to "KPI". By doing so, the 0 value shows up properly. Do you think the KPI Indicator visual itself has a bug or would a DAX statement still be able to fix this visual issue?

 

LandShark_0-1598107799831.png

 

I'm new to DAX and not quite sure what the syntax would be. I do know how to create basic DAX statements though and would just need to see an example for this below. 

VAR __Calc <some calculations>

RETURN IF(ISBLANK(__Calc),0,__Calc)

 

Thanks!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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