Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Join us for a live Q&A! September 21, 10 AM ET - Onboarding Fast in Qlik Sense SaaS! REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
vvvvvvvvvv
Creator
Creator

Use zero instead of null in pivot table

Is there any way to replace '-' by 0 in QS pivot table?

I have a measure to count the number of record by using count(1). But the zero count will be shown as '-' instead of 0 .

How to display 0 for these case?

Labels (6)
8 Replies
G3S
Contributor III
Contributor III

Could you try 

if(yourExpression=0,'0',yourExpression)

vvvvvvvvvv
Creator
Creator
Author

no. already tried still not work.

count(1) will become '-' when there is no record

Kushal_Chawda

@vvvvvvvvvv  If the null value is generated due to missing data then you can't replace it. The only way then is to generate missing data in your table . Look at below link

https://community.qlik.com/t5/QlikView-Documents/Generating-Missing-Data-In-QlikView/ta-p/1491394

 

Steven_Haught
Creator III
Creator III

@vvvvvvvvvv  

As Kush mentioned above you will have to create the 0 Values. You can try using If(Isnull(YourField),0, YourField) It may be best to do in the load as well. 

vvvvvvvvvv
Creator
Creator
Author

if my table is like below

A  B  C
-------------
A1 B1 

A1 B1 

A2 B2 

the pivot table would be like this (counting number of records)
        A1     A2

B1   2         -
B2   -          1

But I want - to be 0 
how to generate the missing data???

Steven_Haught
Creator III
Creator III

@vvvvvvvvvv 

Try using this in the measure that you are doing the count: 

If(IsNull(YOURMEASURE),0,YOURMEASURE)

vvvvvvvvvv
Creator
Creator
Author

not work

Steven_Haught
Creator III
Creator III

Can you share some more info on the data and how your measure?