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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
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

Labels (1)
1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

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
Champion III
Champion III

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
Champion III
Champion III

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

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