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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

how to show the chart expression dynamically?

Hi,

I have 5 metrics(example(GWP,GEP,GEC,CO,GCD),I need to create list drop down for those.

I need to create a chart based on metrics.

whenever user selects one metrics from list box then related metrics should populate in expression.

How can i make list box and based on that how can i show chart?

Thanks,

Raj

4 Replies
Anonymous
Not applicable
Author

Create a Inline at backend/script like:

Test:

Load * inline

[MetricsName, MetricNo

GWP, 1

GEP, 2

GEC,3

CO, 4

GCD,5

];

Now take, MetricsNAme in Listbox, prepare a chart write down their relevant expression,

Now say , you have created expression in Chart Object properties under Expression tab:

Then make it Conditional Enable and write down one condition like:

=MetricNo=1 for GWP  //Similarly for Others, Use metric no for others as well..

Hope this will help!!!

Anonymous
Not applicable
Author

Hope it will help you!!

PFA..

sasikanth
Master
Master

HI ,

Try some thing like,

Load * inline

Metric

GWP

GEP

GEC

CO

GCD

];

Create a variable and assign Metric Field to the variable and then use the variable in the expression like,

In variable Overview add a variable vMetric

vMetric=Metric

=sum({<Metric={'(=$(vMetric))'}>}sales)

avinashelite

create an inline table for all your metric and then in the expression you have the option of conditional enable for the expression . Based in the user selection i.e. metric you can enable the related metric in the expression .