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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
SM_1997_
Frequent Visitor

Line Value cannot say zero percent

Hello, I am having an issue with getting my line value to say zero percent. I have a measure called SLA Achieved % that divides the number of rows that are true by the total number of rows. On my axis I have week numbers.

 

My Dashboard: https://gyazo.com/f07a81943e1cd889ad0d5b3e53b40084

My Measure: 

SLA Achieved % = DIVIDE(CALCULATE(Countrows(Closed),Closed[taskslatable_has_breached]="False"),COUNTROWS(Closed))

 

Some of the week numbers contain both the number of tickets closed and the number with SLA achieved,

some contain only the number of closed incidents, (see Week 41 under P1 Incidents)

some contain no data at all.

 

On the weeks where there is at least one ticket closed but none with SLA Achieved I cannot get my line value to say zero percent.

 

I am aware of the "+0" workaround that I can put on the end of a measure but it will add zero percent on the weeks with no data which I don't want. 

 

Does anyone know of a way I can force my measure to display zero when there is data for closed incidents and none for SLA achieved but display nothing for the weeks where there is no data?

 

Thank you in advance.

 

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@SM_1997_ maybe add 0 only if there is a close ticket:

 

 

Count Closed = COUNTROWS(Closed)

SLA % = 
VAR __closed = [Count Closed]
RETURN
DIVIDE(
   CALCULATE([Count Closed],Closed[taskslatable_has_breached]="False"),
   __closed
) + 
IF ( NOT ISBLANK ( __closed ), 0 )

 

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

 

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.

View solution in original post

3 REPLIES 3
parry2k
Super User
Super User

@SM_1997_ Awesome. glad it worked out. Do subscribe to my YouTube channel, there will be an interesting solution like this which I will be sharing on the regular basis. Link below.

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

 

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.

parry2k
Super User
Super User

@SM_1997_ maybe add 0 only if there is a close ticket:

 

 

Count Closed = COUNTROWS(Closed)

SLA % = 
VAR __closed = [Count Closed]
RETURN
DIVIDE(
   CALCULATE([Count Closed],Closed[taskslatable_has_breached]="False"),
   __closed
) + 
IF ( NOT ISBLANK ( __closed ), 0 )

 

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

 

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.

It worked perfectly! You are a life saver!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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

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.