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

Prev Month Issue

Attached please find the sample data and sample qvw.  I need to calculate  current month and previous month sales.   I am not getting any values  if I try to calculate Previous Months Sales.

Any ideas what am I doing wrong here

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Your Month field is a text field, so Max(Month) won't work.

See attached for a quick fix, but in more detail, see

The Magic of Set Analysis - Point In Time Reporting • Blog • AfterSync

View solution in original post

3 Replies
swuehl
MVP
MVP

Your Month field is a text field, so Max(Month) won't work.

See attached for a quick fix, but in more detail, see

The Magic of Set Analysis - Point In Time Reporting • Blog • AfterSync

Not applicable
Author

Your sample still doesnt work, if I select Apr, Prev month column is still 0

swuehl
MVP
MVP

Right, sorry, you need to ignore the selection in  Month field:

Sum({<MonthNum={$(=Max(MonthNum)-1)}, Month= >} Sales)