Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Shivam22
Contributor III
Contributor III

Conditionally show columns in Table by selecting values from list box

Hi All,

I have a table and i want to show columns only when i select values in list box.

Table

CloumnA , CloumnB, ColumnC, Measue1,Measure2

AAA,         BBB,              CCC,    34,          36

 

I created an inline table to select dimensions from

load * lnline [

_Dim

A

B

C];

 

So, when user select A , ColumnA should appear, and when select B CloumnB should appear and when select C ColumnC should appear,

 

I am using formula at shoudcoulmnif for ColumnA =  substringcount(concat(GetFieldSelections( _Dim],100),','),'A') 

Same for ColumnB -substringcount(concat(GetFieldSelections(_Dim],100),','),'B') 

ColumnC- substringcount(concat(GetFieldSelections(_Dim],100),','),'C') 

 

Now, it only works when i select A and B  from _Dim List box (filter)and as soon as i select C - all columns disappeared.

i think it is to do with Getfiledselections  - when i select all values  it displays  "ALL",and that's causing problems.

Can anyone please help me?

 

Thanks in Advance

 

Labels (4)
1 Solution

Accepted Solutions
robert_mika
MVP
MVP

Hi your expression has extra ']'

Otherwise it works

robert_mika_0-1760851384719.png

 

View solution in original post

3 Replies
robert_mika
MVP
MVP

Hi your expression has extra ']'

Otherwise it works

robert_mika_0-1760851384719.png

 

Shivam22
Contributor III
Contributor III
Author

Thanks @robert_mika  , i don't know if it's a bug in Qlik cloud but the formula is not working.

I used below formula to make it work.

 

if(GetFieldSelections( _Dim)='ALL',1,
if(substringcount(concat(GetFieldSelections(_Dim,100),','),'A')>=1,1,0))

 

Thank You!

robert_mika
MVP
MVP

Did you upload my app or recreated it?

Cloud

 

robert_mika_0-1760933975199.png