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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis - PrevMonth with unselected fields

I have to fields for selecting months: Month (1,2,...), MonthName (Jan,Feb,..). Now I wan to select Previous Month in the chart

sum({$<Month={$(=Only(Month)-1)}>}Amount)

But my selections are in MonthName field not in Month. How can I refer to Previous Month if I have to select month in MonthName not in Month field? I mean when I select February, I want to show January too?



1 Solution

Accepted Solutions
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Add another Set Modifier to ignore user selection in MonthName, and everything will work:

sum({$<Month={$(=Only(Month)-1)} , MonthName= >}Amount)

View solution in original post

2 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Add another Set Modifier to ignore user selection in MonthName, and everything will work:

sum({$<Month={$(=Only(Month)-1)} , MonthName= >}Amount)

llauses243
Creator III
Creator III

Hi Pedro,

This is my offer (see .zip)

Good Luck

/Luis.