Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
djt9006
Contributor
Contributor

Accumulation Month Over Month

How can I suppress the accumulation sum of a column for months that have not yet come.

For instance if the current month is April, how would I make sure that the accumulative total for the month of May, June, July etc. all show a total of $0.

Month

Sales

Accumulation

Jan

10

10

Feb

20

30

Mar

30

60

Apr

40

100

May

0

0

Jun

0

0

Jul

0

0

 

Labels (2)
14 Replies
djt9006
Contributor
Contributor
Author

I replaced Value with sales and I still receive an error in expression message.

=if( month(date#(Month,'MMM'))<= month(today()), Rangesum(Above(sum(sales),0,RowNo())),Rangesum(Above(sum(sales),0,sum(sales))))

Kushal_Chawda

@djt9006  seems like 'sales' is not valid field name in your data..just look at the actual field name in your data. make sure that you have loaded the data in app.

djt9006
Contributor
Contributor
Author

sum(sales) works within my dashboard so I would think it would work in other expressions

Kushal_Chawda

@djt9006  without looking at app it will be difficult to tell what is wrong.  Basically you need to check all field reference (Month,Sales) have correct field name. Syntax wise expression looks fine. I don't see any issue expression unless wrong field reference

djt9006
Contributor
Contributor
Author

I just checked and my Month is named goal_key. Would you mind sharing how this may impact the expression you provided please.

The goal_key is a number that matches the number of the month (Jan = 1, Feb = ).