Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
SonPhan
Partner - Creator
Partner - Creator

Kummulation

Hello Qlik Experts,

Is there a way to display a cummulation on a certain day as a KPI, e.g. in the figure I want to display day 28 which has the value 12284600,2388 as a KPI.
The formula is:
above(RangeSum(Above(sum({<[year]={"$(=year(today())-1)"}>}[net1_otto_commision]), 0 , RowNO())),-1)

When I do this with a sum and an aggragation and give it to a filter, it doesn't give me the right answer.

sum({<tag={'28'}>} aggr(above(RangeSum(Above(sum({<[year]={"$(=year(today())-1)"}>}[netto1_otto_commision]), 0 , RowNO())),-1), tag)))

SonPhan_0-1625236677705.png

best regards son

3 Replies
JordyWegman
Partner - Master
Partner - Master

Hi Son,

Try to start with a smaller example and build it out. Your logic should work, but here's an example from me that works:

2021-07-04 08_45_03-Window.png

I think you need to remove the first above. Try this:

sum( {<tag={'28'}>} 
   aggr(
      RangeSum(
         Above( 
            sum({<[year]={"$(=year(today())-1)"}>}[netto1_otto_commision]),             
         0 , RowNo()
         )
      ),
   tag)
)

 

If you need more help, please add some data.

Jordy

Climber

Work smarter, not harder
SonPhan
Partner - Creator
Partner - Creator
Author

Hello Jordy,

thank you for your support. 

I need the first above because of some other reasons. 

This time I took a lighter KPI without filter:

Test1: above(RangeSum(Above(sum([netto1_otto_commision]), 0 , RowNO())),-1)

Test2: aggr(above(RangeSum(Above(sum([netto1_otto_commision]), 0 , RowNO())),-1), tag)

SonPhan_0-1625423943156.png

 

Actually, the two measures are the same formula with the only difference that the second formula is aggregated by the tag. I just wonder why test1 is not equal to test2.

 

If I work with your simple model, I get the result I want.

JordyWegman
Partner - Master
Partner - Master

Hi Son,

That is because Aggr() will return an array and this is not what you want.

Do you have some data to work with?

Jordy

Climber

Work smarter, not harder