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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
nicogene
Partner - Contributor III
Partner - Contributor III

Replace missing by 0 (numeric format) in pivot table

Dear all,

In a pivot table, I would like to replace missing value by 0 (numeric) but it doesn’t work.

Below my formula:

=num(if(IsNull( Count(Distinct SKey)),0,Count(Distinct SKey)),'# ##0')

Many thanks in advance for your help.

PS: a .qvw file is available in attachment.

Kindest regards,

Nicolas.

14 Replies
nicogene
Partner - Contributor III
Partner - Contributor III
Author

Thanks but it doesn't work for avg(sales).

Kindest regards,

Nicolas.

rubenmarin

Hi, chandel is right, but you need to apply the same logic you are using in transactions expression to the avg expression:

=num(if(IsNull(Sum(Invoiced)/Count(Distinct SKey)),0,Sum(Invoiced)/Count(Distinct SKey)),'# ##0')

agigliotti
Partner - Champion
Partner - Champion

With that option unchecked qlikview ignore the set analysis used in the expression.

agigliotti
Partner - Champion
Partner - Champion

using the if condition I got the zero as number but as I replied to chandel I need to use set analysis within expression.

is there any way to achieve it ?

agigliotti
Partner - Champion
Partner - Champion

Hi,

I have the same needs but I'm using set analysis within expression.

It doesn't works because the set analysis, with the settings suggested by chandel (uncheck suppress zero values), is being ignored.