Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help Needed - How to Show conditional fields based on selections

Hi to All!

My problem its that i have more than 130 columns and i need to show some columns based on a selection of an specific field

For instance

I have 130 columns with datas and other columns. Lets suposse that i have to Show the Month on rows and 130 columns on a table or pivot table.

As i have so many columns i have a separated table with: 130 rows from 1 to 130.

So, on a filter have the 130 values on the separated table.

So, i need to filter on this table those values that i wanna to see on Pivot chart. Something like that:

If i select values 1,2,3,4 and 6, i have to get the follow result:

Month12346
1100100250200150
2100250300100100
350150200300250

But, if i select the values 3,4,20, i have to show:

Month3420
1250200125
2300100200
3200300150

I hope to be clear. Please, HELP!

Thanks!!!

15 Replies
jerem1234
Specialist II
Specialist II

Maybe add | at the end and beginning of the selection list of what Mayil did, that way it can sort of denote an "end" and "beginning" character then search for '|#|'

Try this formula for the dimensions, for example 1:

Index('|' & GetFieldSelections(FieldSelection ,'|',100)&'|','|1|')

Hope this helps!

Made an edit: Need a beginning character as well.

Not applicable
Author

Im sorry but im trying all sugestions but, nothing seems to work fine.

Here its the example of my file.

When i select numbers between 1 to 7, works fine.

But, if i select 29, por example, i see incorrect columns...

jerem1234
Specialist II
Specialist II

I edited my last reply to have a beginning character as well as the ending, I think that should solve it.

Did you try it that way?

jerem1234
Specialist II
Specialist II

I did from 1-30, and it seems to be working with the new beginning character.

PFA

Hope this helps!

Not applicable
Author

Thanks Jerem!!!  Correct!!!

Thanks a Lot!!!!

Not applicable
Author

Finally, the correct formula was:

=   Index('|' & GetFieldSelections(Campo ,'|',$(vMaxCampo))&'|','|1|') or if(len(getfieldselections (Campo) )=0,1,0)

Thanks to All for Help Me!!!!!

Regards!