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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
evansabres
Specialist
Specialist

Restrict Dimension based on Date

I have a straight table in which I want to only show the next ten events based on date. Is this possible within the structure of a straight table and if so, what is the expression? Dimension is EVENTDTE

1 Solution

Accepted Solutions
sunny_talwar

May be this

Only({<EVENTDTE = {"$(='>=' & Date(Today()) & '<=' & Date(Min({<EVENTDTE = {'>=$(=Date(Today()))'}>}EVENTDTE)))"}>} SOLDQTY)

View solution in original post

8 Replies
sunny_talwar

You can either use calculated dimension to do this or use set analysis... both should be able to handle it... but I would try to do this via set analysis just because it tends to give better performance

evansabres
Specialist
Specialist
Author

Thank you, how would the expression be structured?

sunny_talwar

What is your current expression?

evansabres
Specialist
Specialist
Author

=SOLDQTY

sunny_talwar

May be this

Only({<EVENTDTE = {"$(='>=' & Date(Today()) & '<=' & Date(Min({<EVENTDTE = {'>=$(=Date(Today()))'}>}EVENTDTE)))"}>} SOLDQTY)

evansabres
Specialist
Specialist
Author

This makes the sold quantities appear as a null value. The aim is to have only the first ten event dates show, relative to today.

sunny_talwar

My bad, try this

Only({<EVENTDTE = {"$(='>=' & Date(Today()) & '<=' & Date(Min({<EVENTDTE = {'>=$(=Date(Today()))'}>}EVENTDTE, 10)))"}>} SOLDQTY)

There might be some syntax issue, but the idea to look for EVENTDUE which are greater than today and less than the next 10 EVENTDUE  days from today

evansabres
Specialist
Specialist
Author

Thank you