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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
RileyDylan
Contributor
Contributor

variabilisation of dimension!

Hello, I have some dimensions : Product1, Product2, Product3, ...I'm using those dimensions in set analysis I have a filter to select the numero of the product (1, 2, 3 ...) Is it possible to set a variable to determine the dimension ? Equivalent to : if(getfieldselection(value) = 1, sum({} measure), if(getfieldselection(value) = 2, sum({} measure), if(getfieldselection(value) = 3, sum({} measure), )))) I would like something like : myvariable = 'Product'&getfieldselection(value) to do sum({} measure),

1 Reply
jyothish8807
Master II
Master II

Hi RileyDylan ,

Your approach above seems to be correct 🙂

i would do like this:

Backend:

Create a inline table:

Load * Inline [

Value

1

2

3

];

Use "value" as a drop down filter and set as only one value selected.

Create 2 variable:

vDimension = 'Product'&Getfieldselections(value) //Assuming your all dimensions start with "Product" prefix

vMeasure = Sum({<$(vDimension)={'any value'}>}Measure) //use variable vMeasure in your charts 

Best Regards,
KC