Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
MVP
MVP

Re: Dynamic selection of variables

Try like:

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

View solution in original post

6 Replies
Highlighted
Specialist II
Specialist II

Re: Dynamic selection of variables

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

Highlighted
MVP
MVP

Re: Dynamic selection of variables

Please find the attached sample. Hope this helps.

Highlighted
Not applicable

Re: Dynamic selection of variables

Hi tresesco,

Thanks

Same thing i want

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

Regards,

Gaurav

Highlighted
Not applicable

Re: Dynamic selection of variables

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

Highlighted
MVP
MVP

Re: Dynamic selection of variables

Try like:

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

View solution in original post

Highlighted
MVP
MVP

Re: Dynamic selection of variables

Try:

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

& '<=X<'

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