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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
soha1902
Creator
Creator

restrict date based on another date??

Hi All,

I am using one bar chart where FirstDate is my dimension and Sum(Sales) is my expression.

Now my requirement is, if I user select any date from SecondDate then in chart only thsose date will display which is less then or equal to SecondDate.

For eg. if user select 6/14/2014 from SecondDate filter then chart will show from 6/9/2014 to 3/17/2014.

Date.png

Please find sample app in attachment.

7 Replies
vgutkovsky
Master II
Master II

Well, that kind of depends on the relationship of the 2 date fields. How are they connected in the data model?

Regards,

Vlad

soha1902
Creator
Creator
Author

Hi all,

Any suggestions???

sujeetsingh
Master III
Master III

Soha,

You can do the trigger on one date field as select in field and quote condition as where date less than the selected.

The other way is you define a variable which collect the current selected date from Date1 and then use the dimension limit option with this variable

sujeetsingh
Master III
Master III

One more option is that you use calculated dimension as if Selected variable is not null then use date in dimension in chart which is less than or equal to the selected date, else the date by default.

tresesco
MVP
MVP

Try something like:

=Sum({<FirstDate={"<=SecondDate"}>}Sales)

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

I suggest you upload a small example document with some data.


talk is cheap, supply exceeds demand
vgutkovsky
Master II
Master II

As I mentioned, we need to understand how the 2 fields are related to each other first. Gysbert is right, upload a reduced QVW.

Regards,

Vlad