Forum Discussion
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:
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.
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 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.⚡
3 Replies
- parry2kSuper 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 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.⚡
- parry2kSuper 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 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.⚡
- SM_1997_Frequent Visitor
It worked perfectly! You are a life saver!