Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Help with trigger to show the future data by default.

Hi All

I have a pivot table which shows the data from start of the year to the end of the year. What I need is this chart by default it should show the future data only.(i,e) DateField >= today(). May I know how to achieve this with the help of trigger?

Thanks

Attitude

4 Replies
swuehl
Not applicable

Help with trigger to show the future data by default.

I think you could use a trigger on opening of the document (see document properties trigger) or OnActivateSheet (see sheet properties) to set the DateField to today's date.

For example, go to document properties, triggers. Select an OnOpen event trigger with action Select - Select in field.

use

DateField

as field (as is, no equal sign), and

='=sum({<Date = {">=$(=today())"}>}1)'

as search expression.

This will affect all objects that are affected by DateField.

Or you make use of a set of additional variables / data island field, with two states: default (today), free selection and use these states within your pivot table object to limit your DateField if requested. Like above, the trigger would set the state to default on Opening of document or activation of sheet.

Not applicable

Help with trigger to show the future data by default.

Hi

I tried with the solution that you have provided but it didn't workout. Can you please provide some other solution.

Thanks

Attitude

swuehl
Not applicable

Re: Help with trigger to show the future data by default.

Which solution have you tried out? Since I think the solution does work, it would be nice if you could give some more information about what you tried.

Attached a demo of the OnOpen document trigger and selecting the dates >= today.

I think it works, doesn't it?

Stefan

(To demonstrate it, clear selection, save and close the app, start the app).

dennisnet
Not applicable

Re: Help with trigger to show the future data by default.

swuehl solution should work, but only if your Date field has the the same format as the trigger.

To make sure that your date-field always is the same format as the expression you want to compair (or calculate) with. Best way to know this is to make 2 text object.

Text object one:

          =Today()

Text object two:

          =MAX(Datefield)

If the results have not the same formats it will not work.