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

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
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)

Ask me about Qlik Sense Expert Class!

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)

Ask me about Qlik Sense Expert Class!
llauses243
Creator III
Creator III

Hi Pedro,

This is my offer (see .zip)

Good Luck

/Luis.