Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld Online 2021, May 10-12: Our Free, Virtual, Global Event REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
ulagSelva
Partner
Partner

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. 

 

2 Replies
premvihari
Partner
Partner

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

 

ulagSelva
Partner
Partner
Author

Thanks. I have updated my post to clarify further.