Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Skip the ticket, Chat with Qlik Support instead for instant assistance.
cancel
Showing results for 
Search instead for 
Did you mean: 
jubarrosor
Luminary Alumni
Luminary Alumni

Acumulative sum from year start

Hi,

I've got one question:

I need to create a bar chart. I'm using MonthYear as dimension and the expresion must to calculate:

    

     sum(SALES) in current month / sum(SALES) from first day of month to current month.

Example:

MonthYearSalesOfCurrentMonthSalesOfYearMyExpression
Oct14101010/10
Nov14203020/30
Dec14104010/40
Jan15101010/10
Feb15203020/30
Mar15154515/45
Apr155505/50

I've problems to calculate the sales of the year, the condition are ignored and QV only sum the sales of the current month.

SUM({<MonthYear={">=YearStart(max($=MonthYear))}",

              MonthYear={"<=max($=MonthYear)"}>} SALES)

Thak you!

Best Regards!

PS: the expression is an example. It's not a syntax problem 😉

1 Reply
ramoncova06
Specialist III
Specialist III

would have to see how your months are defined, but might work if you switch it to min

SUM({<MonthYear={">=YearStart(min($=MonthYear))}",   MonthYear={"<=max($=MonthYear)"}>} SALES)