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: 
niranjana
Creator
Creator

How to hide empty columns in QlikSense pivot table?

niranjana_0-1756105717632.png

Hi All,

Above is a QlikSense pivot table. The measure exp is  : 

=if(monthname(Today()) = MonthYear,

Sum( total <Field1,Field2> { < MonthYear={"$(=monthname(Max(MonthYear)))" }>}visits)
-
Sum(total <Field1,Field2> { < MonthYear={"$(=monthname(Max(MonthYear)-1))"}>}visits)
,

text('')

)

 

I am getting the values correct. But those empty columns are not getting hidden. I want to hide all months with empty cells except the maximum/current month.

Tried for more than 3 hrs but couldn't think of any idea. 😛 

Any help is appreciated. Thanks in advance!!

Niranjana

Labels (1)
10 Replies
CHRIS_Singa
Creator
Creator

Unticked the null value in your dimension and data manipulation for the null values.

I might work for you

niranjana
Creator
Creator
Author

Hi , yes unchecked those but still not working....

CHRIS_Singa
Creator
Creator

When I look at the expression. You used IF fucntion.

And last condition is Text(' ') → This means that others columns are filled with space.

Try to remove and unticked everything

niranjana
Creator
Creator
Author

Thanks for reply . Removed text(). and changed measure exp to this : 

=if(MonthYear = monthname(Today()),

Sum( total <platform,journey_name> { < MonthYear={"$(=monthname(Max(MonthYear)))" }>}visits)
-
Sum(total <platform,journey_name> { < MonthYear={"$(=monthname(Max(MonthYear)-1))"}>}visits)

)

Removed all conditional shows and unticked all "include null values" boxes. Still getting like this :

niranjana_0-1756111029023.png

 

 

Also , there is sum(Sales) which I must show for all months...I think its because of this second measure....

Amit_Prajapati
Contributor III
Contributor III

Hi Niranjan,

Try with below expeassion.

alt(

if(MonthYear = monthname(Today()),

Sum( total <platform,journey_name> { < MonthYear={"$(=monthname(Max(MonthYear)))" }>}visits)
-
Sum(total <platform,journey_name> { < MonthYear={"$(=monthname(Max(MonthYear)-1))"}>}visits)

),0)

With the help of alt function it will retrun as 0 and from add-ons just uncheck the include zero values.

niranjana
Creator
Creator
Author

Hi, Tried that as well... The cells show 0 but not getting hidden even after unchecking add-on box...

Amit_Prajapati
Contributor III
Contributor III

Hi Niranjan,

You can also create an Master dimenstion as below.

if(MonthYear = monthname(Today()),Month Year) this will return you the month name as Aug 2025 and for other month Year will be - (null) from dimention you can also uncheck the include null values.

Just try once and let me know if it's still not working.

 

niranjana
Creator
Creator
Author

Hi , Thanks for your help. But it is still not working... I think its because of second measure : "total vis" which I must display for all months.....

Amit_Prajapati
Contributor III
Contributor III

Hi,

I also tried the shared one and it's working fine.

if(YearMonth = monthname(Today()),YearMonth)

Before : 

Amit_Prajapati_1-1756201540009.png

After : 

Amit_Prajapati_0-1756201406412.png