Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
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')

michielvandegoo
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.