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: 
alexsid-qlik
Contributor II
Contributor II

Dynamic Columns

Dear Community,

I am currently testing a functionality for my dashboard. The goal is to let the user choose columns that the user wants to see in a table. A very basic demand but still I struggle.

I show available columns with a Filter Pane with $Field as dimension.

And then I have a table where I use the Show condition with this formula < if(GetFieldSelections($Field) like '*Car*',1,0) >.

Now I have a lot of columns and want to make the part < like '*Car*' > not static but dynamic. 

Any ideas how to achieve that? Looking forward to your ideas  🙂

 

Cheers, Alex

Labels (4)
5 Replies
sunny_talwar

but this is show column if condition for a already known dimension... what difference would it make if you change the condition from static car to something dynamic?

alexsid-qlik
Contributor II
Contributor II
Author

Thanks for your reply.

Some more info on that topic: 

I want to have a condition formula where I do not have to specifiy the column name.

So I have a dimension Car, Cost, Type and I would need 3 different formulas. But is it possible to have one formula for all column show conditions?

Cheers, Alex

sunny_talwar

You want to use a single formula for all three dimensions? But this same formula will be repeated three times for each of the three expressions, right? I don't think you can create a single formula which can be copy pasted for each expression... something will need to tell it that if it is cost or car or type dimension

alexsid-qlik
Contributor II
Contributor II
Author

Thank you Sunny.

I really thought it would be possible to have one formula for all columns. I thought about using some kind of identifier for the column "ColumnNo()" based on the "RowNo()" the same field has in the "$Field" Table. But I dont know if that approach works.

sunny_talwar

You might be able to employ GetObjectField , but even with that, you will need to specify which field you want to look into? like for first dimension it would be 

$(='[' & GetObjectField(0) & ']')

and for second dimension it would be

$(='[' & GetObjectField(1) & ']')

So, even with this solution you cannot just blindly copy paste the expression across your dimensions.