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: 
Not applicable

Chart, only display data points after today

I have a QlikView chart where the dimension is Date, and there is a data series spanning 1 year.

Here is an example of the data that is being used:

DateItems
1 Jan 20163
8 Jan 20162
15 Jan 20166
22 Jan 20164
29 Jan 20162
5 Jan 201610

As I stated earlier, the x-axis is date, and the y axis is the # of items. I am using the full accumulation setting, so the y axis data series is always either increasing, or staying the same (if there are 0 items for the week).

However, I cant figure out a way to display only data points after today, I am not interested in data points in the past.

There has to be some sort of conditional box in the chart properties that let me define something along the lines of:

Enable Conditional: Date>Today()

I have been scouring the forums for a similar question but I haven't seen any, please advise!

Thank you,

Conor

7 Replies
sunny_talwar

Add this as your set analysis statement:

{<Date = {"$(='>=' & Date(Today(), 'D MMM YYYY'))"}>}

sunny_talwar

Alternatively in your dimension you can use a calculated dimension:

If(Date >= Today(), Date)

and then 'Suppress When Value Is Null' on the dimension tab.

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

I'd calculate a conditional flag in the script,  _FutureDate_Flag, and use it in my Set Analysis:

sum( {<_FutureDate_Flag={1}>} Value)

Cheers,

Oleg Troyansky

Upgrade your Qlik skills at the Masters Summit for Qlik - coming soon to Milan, Italy!

Not applicable
Author

This is similar to the behavior I would like!

The only problem is that I still want to display the time period before the x-axis, because I have a series before today I'm interested in.

Series 1 only before today, and series 2 only after today. Both series are full accumulation expressions.

to

Thoughts?

sunny_talwar

Then I would suggest using Set Analysis (and not the calculated dimension).

You can make changes to the script by adding flags or use this -> {<Date = {"$(='<' & Date(Today(), 'D MMM YYYY'))"}>} for Series 1 for Series 2 you would have to use it very smartly because you don't want to restart the accumulation from 0. So I would try this for series 2:

If(Date >= Today(), YourExpression)

Not applicable
Author

Sorry, this didn't end up working

sunny_talwar

Its been 8 months, I don't even remember what we were trying to do