Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Limit for number of columns using conditional expressions in straight tables?

Hello,

I'm trying to create a straight table where the user can select which columns to show/hide using conditional expressions. The data set is large and I have a lot of expressions (about 150), so I don't want to display all of these columns at once by default. I created a separate table with the names of the questions. The questions are shown in a list box, and a user can select which questions they want to see, which then triggers the show/hide in the straight table using GetFieldSelections().

This works fine until I select more than 6 questions. After selecting the 7th question, all of the selected columns suddenly disappear. Is there a limit when using conditionals in expressions in straight tables? It is not the data size, because if I remove all of the conditional formatting everything displays just fine---it's the selection of the 7th field, regardless of the field, that causes issues. And if I can't fix this, does anyone have any suggestions for an alternative?

I would love to send the file, but unfortunately it contains confidential information so I cannot do so.

Thank you!

1 Solution

Accepted Solutions
udaya_kumar
Specialist
Specialist

Hi NM,

Try this expression

=GetFieldSelections(Expression1,',',446)

GetFieldSelections function has a limit of values as 6, after 6, it will show the count like 7 of 446.

If you want to show the values instead of count, then  you need to use the above expression.

Try it and let us know.

View solution in original post

6 Replies
avinashelite

Their is not such limitations..I think the value your selecting after certain filter is not relevant so Qlikview will apply that filter and resets rest of the filters...so use the lock feature in Qlikview and check you will get the difference...

Hope this answers your question 

Not applicable
Author

Hi N,

Please take a look at a result of function GetFieldSelections() in my examples:

Up to 6 elements (expression under "Result" is =GetFieldSelections(Expression1)):

upto5.PNG

7 or more:

sevenormore.PNG

So you cannot use GetFieldSelections in your case (EDIT: Is seems that you can, check Uday Kumar answer)

You should try something like =concat(distinct Expression1,',') . It will give you the complete list of selected elements. But you need to figure out how to use it to hide/show expressions. It is also possible of course and you can find it on community.

concat.PNG

BR,

Milosz

udaya_kumar
Specialist
Specialist

Hi NM,

Try this expression

=GetFieldSelections(Expression1,',',446)

GetFieldSelections function has a limit of values as 6, after 6, it will show the count like 7 of 446.

If you want to show the values instead of count, then  you need to use the above expression.

Try it and let us know.

Not applicable
Author

Hi,

That's nice. I didn't know that you can pass MaxValues number to GetFieldsSelections but it seems that reference manual confims that It is useful indeed.

BR,

Milosz

sasiparupudi1
Master III
Master III

or May be you could Try

GetFieldSelections(Field,',',GetPossibleCount(Field))

hth

Sas

Not applicable
Author

This did it. Thank you!