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: 
gauravkhare
Creator II
Creator II

I want to have the table change its dimension to whatever is picked up from the list box and display it as dimension for all the measures in the table.

Hello Gurus

I want to have the table change its dimension to whatever is picked up from the list box and display it as dimension for all the measures in the table. How can I achieve this.. I tried few things bt was not successful

Thanks in advance

10 Replies
chrisg
Partner - Creator III
Partner - Creator III

Hi Gaurav,

write the value from the lustbox into a variable and assign the var as the dimision.
at the dimension.

hope that helps

Christoph

Do or Do Not. There is no try!
jonathandienst
Partner - Champion III
Partner - Champion III

Create one dimension entry for each of the dimensions, and use conditional display of the dimension. Use an expression like

     =If(Concat(fieldname, ';') like '*this_dimension*', 1, 0)

     or

     =WildMatch(GetFieldSelections(fieldname), '*this_dimension*')

For each dimension, replace the fieldname with the correct fieldname and the like string (*this_dimension*) with the value of the dimension in fieldname. Keep the wildcards *.

This approach allows you to select more than one dimension and display the table with one or two or more dimensions (or all dimensions for the Concat() option if nothing is selected).

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
gauravkhare
Creator II
Creator II
Author

Hello Christoph,


Thanks for prompt reply. The solution you suggested looks good. Pls guide me more in detail. I tried using GetFieldSelections function bt seems not working.

many thanks

sunny_talwar

Can you check if this is inline with what you are looking to get?

When we select Region from the Dim list box

Capture.PNG

When we select Country from Dim list box

Capture.PNG

Drawback of this approach is that you can only view one dimension at a time. So I have Dim list box 'Always One Selected Value Only' which will force it to only one selection at all times and won't even allow clearing it out as well.

Best,

Sunny

gauravkhare
Creator II
Creator II
Author

Hello Sunny, this works like a charm.

Many thanks

sunny_talwar

Just realized, is this for Qlik Sense or QlikView?

gauravkhare
Creator II
Creator II
Author

it's for qlik sense

sunny_talwar

I guess the concept will still work, but for list box you will have to use an extension which would allow you to restrict to only one selection at a time. Other than that, the method can be used in Qlik Sense as well.

gauravkhare
Creator II
Creator II
Author

Yeah Sunny, I agree..we need to use extension object for that purpose