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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Year to date function

I wish to add a year to date function to one of my expressions, but rather then it running from the current date I would like it to run from July. Is there any way that I am able to do this?

Thanks

Labels (1)
1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try something like this to get this years sales upto and including July:

sum({<Year={'$(=year(today())-3)'},Month={'<=7'} >} Sales)

This assumes you have a Year and Month field (and a Sales field)


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try something like this to get this years sales upto and including July:

sum({<Year={'$(=year(today())-3)'},Month={'<=7'} >} Sales)

This assumes you have a Year and Month field (and a Sales field)


talk is cheap, supply exceeds demand
OmarBenSalem
Partner - Champion II
Partner - Champion II

Hi Gysbert,

the -3 in the expression "year(today())-3)", what is that for?