Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

gauravkhare
Contributor

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
Contributor II

Re: 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.

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

MVP
MVP

Re: 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.

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
Contributor

Re: 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 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

Re: 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.

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
Contributor

Re: 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 Sunny, this works like a charm.

Many thanks

Re: 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.

Just realized, is this for Qlik Sense or QlikView?

gauravkhare
Contributor

Re: 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.

it's for qlik sense

Re: 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.

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
Contributor

Re: 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.

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

Community Browser