Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Accumulated column data with non accumulated expression total

Hi,

I have a scenario in which I need an accumulated total in a column, but the expression total needs to stay remain non-accumulated .

For example, in the screenshot below I'm accumulating values in the column 'Signups Baseline Accum.' and instead of returning an expression total of 246, I need it to be the non accumulated total of 41:

Screen Shot 2014-07-24 at 11.35.36.png

I've attached a sample with the data I'm working with. If anyone has a solution using set analysis, perhaps an extra level of aggregation, that would be great.

Thanks,

Matt

6 Replies
Not applicable
Author

I think I've solved it using a 'max' in the aggregation. Will reopen if this solution doesn't work, but think I'm good to go.

stigchel
Partner - Master
Partner - Master

I'm offcourse not completely familiar with your data and requirements, but it seems to me in theory the total is then equal to the max of the accumulated expression. If so, you can adjust the expression total to the max of rows.

Total.png

stigchel
Partner - Master
Partner - Master

I was just too late 

Not applicable
Author

Ok, so max won't work since I'm aggregating over country as well as date. Max returns the highest single value in the accumulated total, but I need is actually the aggregated total over country on the last date (max date).

If anyone has any tips or knows how to do this that would be great. Here's an updated screenshot:

Screen Shot 2014-07-24 at 12.19.40.png

Column 'Signups Baseline Accum.' is comprised of a running total per country and date and I need the expression total to equal 155, the non accumulated total.

Updated sample data attached. Please use latest qvw.

Thanks in advance,

Matt

stigchel
Partner - Master
Partner - Master

You can use the fact that the total row has a RowNo of 0, so in your Accumulated expression use

If(RowNo()>0, The accumulated expression, otherwise your 'normal' Signups Baseline expression ).

Not applicable
Author

Thanks for the help, for the time being i've wrapped the expression in this: max(aggr( exp , [Visit Date])) and it's working. Not perfect in all situation but working.

I'll review the if option you presented above later, seems like it would work, and mark correct if it does.

Thanks again.

Matt