How to remove div/0 error in KPI card

Is there any way that I can set comparison method as difference in the KPI card if I am getting div/0 ie. if previous day my total records were 0 ..otherwise difference as percent as comparison method

I have seen earlier QnAs where using a calculated field is suggested for KPI card to remove this error, but then it displays the percent difference as wrong

Hi @Mahika_Garg,

Hope everything is well! Just to make sure, did you also try the calculated field solution presented in this post? If so and it still does not work, please let me know and I can look into another workaround to hopefully get past the wrong percent difference.

Thank you!

So, I have although figured out a way to use calculated field like this-
ifelse(
sum({Total Records}) = 0,
NULL,
sum({Total Records})
)

but it then hides comparison bar in KPI card when previous day has total records=0

Ideally, it would be great if we could show main value ie, today’s total records,
In comparison bar - yesterday’s total records as 0 and for difference as percent as N/A or blank

Hi @Mahika_Garg,

I believe the reason that behavior is occurring is because, since KPI’s are numeric visuals, the comparison bar does not display since a null case is reached. To workaround this, I would recommend separating the today and yesterday records with two KPI’s, as that should allow you to have full control of value display and comparison.

Let me know if this helps!

No, unfortunately I cannot do that.

Is there any way that we can show if there is error div/0 we default it to 100%

Hi @Mahika_Garg,

I do not believe there is currently any error handling for Quick visuals at this time. I would definitely recommend creating a support ticket with AWS Support, just in case there are ways to do so.

Thank you!

Hi @Mahika_Garg,

Just checking back in since we haven’t heard from you in a bit. I wanted to see if the guidance shared earlier helped resolve your question, or if you found a solution in the meantime.

If you still have any additional questions related to your initial post, feel free to share them. Otherwise, any update you’re able to provide within the next 3 business days would be helpful for the community.

Thank you

Hi @Mahika_Garg,

Since I haven’t received any further updates from you, I’ll treat this inquiry as complete for now. If you have any additional questions, feel free to create a new post in the community and link this discussion for context.

Thank you