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: 
bschnug
Contributor II
Contributor II

Show Column If not working as expected in Pivot Table

I am having trouble getting the show column if function to work as expected.

I have one field "Month Year" as the columns in my pivot table. 

There is a flag field that has these values (straight table to illustrate the values, not the pivot I want to modify):

bschnug_0-1641408132894.png

 

As of now, the columns in my pivot table show every date:

bschnug_2-1641408398950.png

I would like to only show columns where the value of the flag for each date is 1.

However, when I use this formula:

if(Rolling12Flag=1,1,0) or if(Rolling12Flag='1',1,0), the output only shows a blank in the column (all a single column with no field) and the data tab gives me this:

bschnug_1-1641408298191.png

Any ideas as to why this may be the case? 

1 Reply
AshutoshBhumkar
Partner - Specialist
Partner - Specialist

Hello,

Try set analysis.

e.g Sum({<Rolling12MonthsFlag = {1}>}Sales)

This expression will give you sales values only for MonthYears where flag=1    i.e Jan 21 to Dec 21

 

Thanks,

Ashutosh