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: 
rbartley
Specialist II
Specialist II

Hide pivot table columns where all values are null but show 0s

Hi everyone,

I have created a pivot table and have a mix of positive values, nulls and zeros in the data columns.  I would like to be able to display the following:

1) For columns where all values are null, do not display

2) For columns with non-null values display nulls as '-', 0 as 0 and positive values as 0 000 00.##.  

I tried using the measure formula: if(Not IsNull(Value),Value), but this still displays the columns where all records are null if I check the Add-ons/Data handling/Include zero values and if I uncheck it, the 0 values disappear.

Any ideas?

 

Thanks in advance.

 

 

13 Replies
rbartley
Specialist II
Specialist II
Author

Unfortunately, this won't work either as I want to show NULL values for years where not all the values are NULL.

rbartley
Specialist II
Specialist II
Author

In theory, this formula should work: If(Sum(Len(Value))>0,Value,-1), but the restriction on the Year column does not remove the -1 columns.  

rbartley
Specialist II
Specialist II
Author

I found a way of achieving this by converting the value to text:

If(Value=0,Text('0'),Text(Value))

Display Zero and Null using Text function Pivot Table.PNG

The pivot table now shows nulls and zeros, but hides 'empty' columns.

Shivam_Sahu
Contributor III
Contributor III

Could you please attach an example here.