Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
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
Luminary Alumni
Luminary Alumni

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