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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with the SUM expression

Hello All,

Let's consider following table:

MONTH_CODE DATE AMOUNT

2009/01/01 2009-01-25 200

2009/01/01 2009-01-31 250

2009/01/02 2009-02-14 300

2009/01/02 2009-02-28 350

2009/01/03 2009-03-31 400

2009/02/04 2009-04-30 500

Now, I would like to ask you to help me to evaluate an expression that for the selected MONTH_CODE calculates the sum of the AMOUNT field for all previous records.

For the MONTH_CODE:

- 2009/01/01 -> 450

- 2009/01/03 -> 1500, etc.

Probably it is really easy but I can't figure out the proper solution. [8o|]

Thanks in advance for your help.

Kind regards,

JTPro

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

Check the attached application.

Hope that should solve your purpose

- Sridhar

View solution in original post

5 Replies
johnw
Champion III
Champion III

Well, it depends on WHERE you want to do this. If this is in a chart, for instance, using sum(AMOUNT) and selecting Full Accumulation may be all you need. If that's not it, let us know a few more details so that we can help you further.

Not applicable
Author

Hi,

I just need to evaluate expression without putting it into chart.

My intention is to allow user to select appropriate month code and as a result give him/her an accumulation sum from the beginning of the year.

I hope my explanation is more clear right now.

Kind regards,

JTPro

Not applicable
Author

Please, help me to figure out the right expression. I know that there must be something tricky 🙂

Kind regards,

JTPro

Not applicable
Author

hmm.. in my experience, I used a pivot table and accumulated the totals. This provides the user full visibility of all periods though. To cumulate, you must use either the ABOVE function or BEFORE functions.

Other than that, I cant help you any further with that.

Mike

Not applicable
Author

Hi,

Check the attached application.

Hope that should solve your purpose

- Sridhar