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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis with Variable ( Previous month)

Hi, guys!

I need to create an expression in straight table summing values of previous month . I've created a variable for previous month: vPrevMonth=Date((Month(Today())-1),'MMM-YY')

I try an expression like :Sum({<Vacation_Date={$(vPrevMonth)}>} Days), but it doesnt work.

Vacation_Date format is 'MMM-YY'.

May be I have a mistake in my syntax?

Sample application is attached.

Thank You!

12 Replies
linusblomberg
Creator II
Creator II

Won't that give you yesterdays date?

sasiparupudi1
Master III
Master III

Yeah sorry, It should be

Date(AddMonths(Today(),-1),'MMM-YY')

Michiel_QV_Fan
Specialist
Specialist

Diane, that is exactly what this Month_ID solution does,

with the bonus that if you select a different month it will show the month before that month.