Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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)))
best regards son
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:
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
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)
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.
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