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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
msapre
Contributor II
Contributor II

Store Date from Date Filter and Update table based on the selected date

I have a date filter, which looks like this.

msapre_0-1744815956735.png

I want to make it so that when the user selects a date, a table further down updates.

The value par is just the variable par. I want to store the selected date, and display the par variable in a table for the last 2 quarters before the selected date, sorted by investors with the highest par value on the selected date. How would I achieve this?

msapre_1-1744816048633.png

 

1 Solution

Accepted Solutions
nevopotokcloudinary

Hi

since I'm using variable so my expression contains the varialbles instead

 

e.g.

vMaxDate = Max(DateField)

vMinDate = Date(AddMonths(Max(DateField),-6))

 

Sum({<DateField = {">=$(vMaxDate)<=$(vMinDate)"}>} Investors)

 

There are main two reason that I rather use variables:

1.reuse of the same code and function in many places and reduce the chances to mistakes.

2.Variable only calc once while in complex app that contains many calc I rather to minimize the number of calculation so the UI will work smooth as possible

View solution in original post

4 Replies
nevopotokcloudinary

Hi,

What I usually do is storing the selected date as vMaxDate (variable) and then another variable when I subtracting x days and then get two dates which I use them in my set analysis.

 

Anil_Babu_Samineni

how is your expression looks like? IMO - I could do like this

Sum({<DateField = {">=$(=Date(AddMonths(DateField, -6)))<=$(=Date(Max(DateField)))"}>} Investors)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
nevopotokcloudinary

Hi

since I'm using variable so my expression contains the varialbles instead

 

e.g.

vMaxDate = Max(DateField)

vMinDate = Date(AddMonths(Max(DateField),-6))

 

Sum({<DateField = {">=$(vMaxDate)<=$(vMinDate)"}>} Investors)

 

There are main two reason that I rather use variables:

1.reuse of the same code and function in many places and reduce the chances to mistakes.

2.Variable only calc once while in complex app that contains many calc I rather to minimize the number of calculation so the UI will work smooth as possible

msapre
Contributor II
Contributor II
Author

Thanks! This worked for my charts.