Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Chart with parameter as expression

Hi all

I'd like to create a dynamic Bar Chart with this constraints :

An user can choose a variable in a listBox and the Chart displays the result for this variable as an expression.

To achieve this I have a table with n variables V1 to Vn and some dimensions

I have also a table of infomation for each variable

Variable

Label

Denominator

V1

Label of variable 1

V5

V2

Label of variable 2

V4

V3

Label of variable 3

V2

...

My objective is to create a bar chart using :

- the Label information as a title;

- the denominator as a part of my expression . Example = Sum(V1)/Sum(V5)

Is it possible to achieve this in a straighforward way ?

Regards and merry Xmas

Jean-Jacques

2 Replies
Not applicable
Author

Are they making a selection on Variable? If so, you should be able to use Only().

Label:

=Only(Label)


Expression:

Sum($(=Only(Variable)))/Sum($(=Only(Denominator)))


I think you need the dollar sign expansion in the Sums to avoid nested aggregates.

Not applicable
Author

Well done Ninja !

Exactly what I need. You are right the dollar sign expansion is needed

Thanks for your time