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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis for a range of months

What is wrong with this expression?

Sum({$<MonthNumber={"<=$(=Only(MonthNumber))"}, Year={$(=Only(Year))} >} Amount)

I want to get the the sum of the amount for the selected year and for january up to the selected month. So, If I select 2010 and June, I expect to see the sum of the Amount for 2010 and January to June.

However, this expression is returning me only the selected month.

I cannot change $ to 1, because that will exclude my other selecions (customer type, country, etc).

Any ideas?



1 Reply
pover
Partner - Master
Partner - Master

I imagine that the user is not selecting MonthNumber directly, but rather selecting a field that contains Jan, Feb, Mar, etc. so what you need to do is clear the list that they select first.

sum({$<MonthName=, MonthNumber={"<=$(.....)>} Amount)

Regards, Karl