Forum Discussion
Power BI KPI Matrix Displaying Zero Target Value
Hi Anonymous ,
Can you try adding some more information like screenshots of the visual, etc. to explain your issue a bit more?
You can refer following blog on how to get your question answered on the forum:
Thanks,
Pragati
- Anonymous4 years agoNot applicable
I have a table storing the target values. Ones with >0 display as expected, but if the target =0 then the control displays blank.
Please let me know if you need more information.
- Anonymous4 years agoNot applicable
Hi Jing
"
It seems KPI Status is calculated with a formula like DIVIDE([Current Value] - [Target Value], [Target Value]). So when a target value is zero, it returns the optional value blank as zero cannot be the divisor.
Maybe you can create a measure to calculate the result by your own and put this measure into a Matrix visual to display the difference percentages. "
The logic makes sense, but could you please suggest how I use a measure without running into the same logic?
Thanks
Karen
- v-jingzhang4 years agoCommunity Support
Hi Anonymous
When the divisor is zero, any increase or decrease percentage would be infinite, which is mathematically meaningless. I'm not in your situation so I'm not able to suggest which optional result can meet your need better when the target value is zero. It's up to you.
You can create a measure like below and replace "whatever" with the value you want for the special case when target value is zero.
rate = DIVIDE ( SUM ( 'tablename'[Current Value] ) - SUM ( 'tablename'[Target Value] ), SUM ( 'tablename'[Target Value] ), "whatever" )I put it in a table visual as below.
There are many discussions about how to calculate growth percent when start value is 0. You can refer to below discussions or google a bit to get some ideas.
math - How to calculate percentage when old value is ZERO - Stack Overflow
How to get a percentage increase from a base of 0 in Excel - Quora
Best regards,
Jing
If this post helps, please Accept it as Solution to help other members find it.