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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Creating a Dynamic Expression using Set Analysis

I would like to be able to select Year and Current Month and have the results returned give me current year and current month +2. So, if I select 2009 and select January...I want the Dollars returned to equal January, February and March (45,000 total). I'm sure this is simple, but I am new to Qlikview and am learning how to create these expressions. Thank you!

Total Dollars
20092010
January 10,00030000
February 15,00020000
March 20,00015000
April50,00025000
May10,00030000
June20,00020000
July25,00030000
August20,00020000
September50,00015000
October10,00025000
November20,00030000
December25,00020000


4 Replies
Not applicable
Author

Hi Palommel,

Here you are a possible solution.

I hope this would help to you.

Best regards.

Not applicable
Author

Thanks Miguel. This was helpful, but I need a little more guidance. Thanks!

YearPeriodYear/PeriodAmount
20080120080140Selections: Year Period = 200902
20080220080250Results should be: 70
20080320080310
20080420080420We want the expression to bring back total of 3 period (current plus prior 2)
20080520080530
20080620080640The formula below worked, however we are
20090120090110struggling to get the system to cross over years.
20090220090220Instead of knowing that the Periods go from 1 - 13, the system continues counting
20090320090330(I,e. 200902, 200901, 200900, 200899, etc.)
20090420090440We need it to recognize 200902, 200901, 200813, 200812, etc…
20090520090550
20090620090610=Sum({< Date={'>=$(=Max(Date)) <=$(=AddMonths(Max(Date), +2))'},
20090720090720 Month = >} Amount)
20090820090830
20090920090940Any suggestions????
20091020091050
20091120091110
20091220091220
20091320091330


Not applicable
Author

ignore chart above, it is incorrect. Please use this information...thank you!

YearPeriodYear/PeriodAmount
20080820080840Selections: Year Period = 200902
20080920080950Results should be: 70
20081020081010
20081120081120We want the expression to bring back total of 3 period (current plus prior 2)
20081220081230
20081320081340The formula below worked, however we are
20090120090110struggling to get the system to cross over years.
20090220090220Instead of knowing that the Periods go from 1 - 13, the system continues counting
20090320090330(I,e. 200902, 200901, 200900, 200899, etc.)
20090420090440We need it to recognize 200902, 200901, 200813, 200812, etc…
20090520090550
20090620090610=Sum({< Date={'>=$(=Max(Date)) <=$(=AddMonths(Max(Date), +2))'},
20090720090720 Month = >} Amount)
20090820090830
20090920090940Any suggestions????
20091020091050
20091120091110
20091220091220
20091320091330


Not applicable
Author

Hi Palommel,

Here you are a possible solution, I hope this helps you.

Best regards.