Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
guibsantos
Contributor II
Contributor II

Limit the number of columns on a pivot

Hello Comunity, 

I have a pivot where I have as a dimension column a field called 'Scenario' which fields are (A18, A19, A20, B20..)

I would like to restrict the pivot to show only 2 columns at a time. I want these fields to be chosen based on a filter pane.

The obvious path to me would be to restrict my filter pane to only 2 selections. Is there anyway I could set this?

Thank you for your comments!

3 Replies
Chanty4u
MVP
MVP

try to add this condtions 

GetSelectedCount(fieldname)=2

 

or

to test

if(getselectedcount(fieldname)=2, 1,0)

guibsantos
Contributor II
Contributor II
Author

Hello, 

Thank you for the reply.

I have inserted your expressions in the pivot column dimension 'Scenario' but they dont really do what I need.

With your expressions, when I select just 2 fields the filter pane the pivot shows each of the 2 columns. When i chose 3, it just sums all the columns into one, and when I deselect all the fields in the this filter pane, it shows each field in the pivot columns.

Is still enables the users to select more than 1 field in the Filter Pane, I want to restrict this..

 

Is there any way I can restrict this into the filter pane? then the columns of pivot will consequently adjust just to 2 columns.

 

Thank you

guibsantos
Contributor II
Contributor II
Author

more than 2* I want to restrict it to chose up to 2 selections*