Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
shinnickr
Creator II
Creator II

Set a variable to include everything up to yesterday's date.

Hi,

I am hoping to set a variable to include every day up to yesterday.  My field starts in 2012 and I want to include every day from 2012 -  yesterday.  I have a variable for yesterdays date 'Date(Today() -1)' but I want to include everything up to and including that date.  I don't know if I'll need some set analysis or if there's a function that would help me with that so I would appreciate any help that can be given.

Thank you very much.

42 Replies
sunny_talwar

Try a trigger like this

=[Service Date] < Today()

shinnickr
Creator II
Creator II
Author

I tried using a Select in Field trigger with Service Date as the Field and =[Service Date] < Today() in the Search String, but it did not work.  Am I using the correct Action?  I didn't think expressions worked in triggers.

sunny_talwar

Did you make sure to have an equal sign?

Field -> No equal sign here

Service Date

Expression

=[Service Date] < Today()

shinnickr
Creator II
Creator II
Author

Trigger.PNG

Yup I have an equal sign here.

sunny_talwar

and this doesn't work? Really, I would have thought that this would work... can you share an example?

vishsaggi
Champion III
Champion III

Try like in your Field section

Use [] square brackets around your field name like

[Service Date]

shinnickr
Creator II
Creator II
Author

I don't really know how to share an example.  What would be the best way for me to do that?

sunny_talwar

Look here:

Uploading a Sample

vishsaggi
Champion III
Champion III

Or may be try this?

Field

Service Date

Expre:

= '(' & Concat(IF([Service Date] < Today(), [Service Date]), '|') & ')'

shinnickr
Creator II
Creator II
Author

Ah hah!  That worked!!  Oh my goodness, thank you so much!!