Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dynamic selection of variables

Hi All,

I have a formula as follows

=class(J,$(=Stdev(J)),'x',$(=Avg(J)))

J,M,N are a column in database i want M or N in place of J .

Basically i want to change metrics on selection in list box where list box will be having J,M,N

Can any one help me?

Regards,

Gaurav

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try like:

=Class($(vDim),$(=Stdev($(vDim))),'x',$(=Avg($(vDim))))

View solution in original post

6 Replies
qliksus
Specialist II
Specialist II

Hi,

I don't understand fully your requirement, you can acheive by using some excel file as below,

->Create a excel file with two filed , one will have J,M,N and other will have expression.

->Load into QV

->Create a variable and point to the expression field in the excel.

->Create a list box and point to dimension field

Done.

Or else explain ur question with small example would be helpful

tresesco
MVP
MVP

Please find the attached sample. Hope this helps.

Not applicable
Author

Hi tresesco,

Thanks

Same thing i want

But i also want those column names in standard deviation and average field as well.

Regards,

Gaurav

Not applicable
Author

Also can you tell me how to format  23.4567<=x<45.6789 to  23.4<=x<45.6?

tresesco
MVP
MVP

Try like:

=Class($(vDim),$(=Stdev($(vDim))),'x',$(=Avg($(vDim))))

tresesco
MVP
MVP

Try:

=Num(SubField(Class($(vDim),$(=Stdev($(vDim))),'x',$(=Avg($(vDim)))),'<',1),'##.##')

& '<=X<'

& Num(SubField(Class($(vDim),$(=Stdev($(vDim))),'x',$(=Avg($(vDim)))),'<',-1),'##.##')