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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
ulagSelva
Partner - Contributor
Partner - Contributor

How to access and use the current selected value of the filter in chart expression

Hello,

 

I have two dimensions in the filter pane. 

I would like to get the current selected values of both the dimensions in the chart expression.

I would like to use those values to filter out some of the measures in the chart.

 

My current script is: 

=if(SD_perf >= Date('$(=Date(Max(NewCol)))'-21), max(RMSE_error_perf),NULL())

Here, the 'NewCol' is one of the dimensions in the filter pane. Although Max(NewCol) works here, I would like to get the current selected value.

 

Example data:

A  A1  B      C  D

a 1/1/2019 1/1/2019 1.2 -

a 1/1/2019 1/1/2019  - 0.4

a 1/1/2019 2/1/2019 2.2 -

a 1/1/2019 2/1/2019 - 2.5

a 1/1/2019 3/1/2019 3.2 - 

a 1/1/2019 3/1/2019  - 5.6

a 2/1/2019 2/1/2019 2.2 -

a 2/1/2019 2/1/2019 - 2.5

a 2/1/2019 3/1/2019 3.2 -

a 2/1/2019 3/1/2019 - 5.6

a 3/1/2019 3/1/2019 3.2 -

a 3/1/2019 3/1/2019 - 5.6

'A' and 'A1' are filter pane dimensions. 'B' is the dimension of the chart and 'C' and 'D' are the measures.

Once 'A' and 'A1' are selected, I would like to plot measures from beginning values of of 'C' (or 'D') until '21 days  before the current selected value of 'A1''.  I want to have one more plot with the values starting from '21 days  before the current selected value of 'A1'' until the current selected value of 'A1'. Thus, I would like to know how I can get the current selected value of 'A1'.

Thanks. 

 

Labels (1)
2 Replies
premvihari
Partner - Creator
Partner - Creator

Please post the sample data .
You are trying the maximum of date and then expecting the selection value which is un clear

 

ulagSelva
Partner - Contributor
Partner - Contributor
Author

Thanks. I have updated my post to clarify further.