Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
helen_pip
Creator III
Creator III

How to handle 0 values in a % calculation

Dear Qlikview user

I have a dataset which is being loaded into Qlikview in the following format

Date                   Metric      Numerator     Denominator

01/01/2015          ABC             210               250

01/02/2015          DEF             107               195

01/03/2015          GHI               0                   0

I load my data into Qlikview and then have a simple calculation to find out the %

I.e.  Numerator/Denominator

However my Metric GHI which has 0 values in the column is displaying a null value.  If I go the presentation tab and change the Null symbol from a '-' to a 0, it displays this value in my table as text

Can someone kindly help me write an expression which will return a 0% for the metric which is returning null values

Any help is greatly appreciated

Kind Regards

Helen

4 Replies
MindaugasBacius
Partner - Specialist III
Partner - Specialist III

Try in Presentation tab disable:

Screenshot_1.jpg

helen_pip
Creator III
Creator III
Author

Thank you for your suggestion, but this still returns a Null value

Thanks

Helen

MK_QSL
MVP
MVP

Alt(Numerator/Denominator,0)

Go to presentation tab and untick Suppress Zero-Values

MindaugasBacius
Partner - Specialist III
Partner - Specialist III

Combine the previous suggestion with the Expression:

If(Numerator = 0, 0, Numerator/Denominator)