Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Phill123456
Contributor
Contributor

Qlik Sense Null Values to Zeros

I have a Pivot table that I am trying to remove the dashes with zeros, the scenario is if the Salesperson has not sold a shirt (etc) the pivot table is entering a dash as no value against the column of shirts. I need to change this, so it brings back a zero (0) value instead of a dash (-).  Does anyone have any suggestions on how to do this (Please)?

Phill123456_0-1702866478386.png

 

Labels (2)
4 Replies
Ahidhar
Creator III
Creator III

try this

rangesum(expression,0)

Gabbar
Specialist
Specialist

These null values indicate that there is no relation between Column dimension and row Dimension.

Example:- 
According to your dataset there are No Shirts, Corresponding to tuesday (Even before Set analysis).

Ahidhar
Creator III
Creator III

add zero to to Items with null values like this

tab:
load Item,Day,Item&'|'&Day as Temp,sold;
load * inline
[
Item,Day,sold
suits,Mon,5
shirts,Mon,2
belts,Mon,2
suits,Tue,2
pants,Tue,5
socks,Tue,12
footwear,Tue,5
suits,Wed,2
shirts,Wed,2
belts,Wed,2
socks,Wed,2
footwear,Wed,2
suits,Thu,15
shirts,Thu,15
belts,Thu,12
suits,Fri,32
shirts,Fri,32
pants,Fri,12
belts,Fri,25
];

load 0 as dum AutoGenerate 0;
for each i in FieldValueList('Day')
Concatenate(tab)
load distinct Item,'$(i)' as Day,0 as sold
resident tab where not exists(Temp,Item&'|$(i)');
next i;
drop field dum;

tab1:
load Item,Day,sold
resident tab;drop table tab;