Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
ananyaghosh
Creator III
Creator III

Need help for above() function

Hi,

I have the below data

   

11
23
36
410
515
621
728
836
945

You can see that for 2nd column, we need to add cumulative sum of values based on first column and I have used the below set expression:-

rangesum(Above(sum([Sales Amt]))) + column(1)

but it does not work for me.

Thanks,

Sandip Ghosh

13 Replies
Anil_Babu_Samineni

May be this?

If(sum({$<[Proc Date]={">=$(=YearStart(Max([Proc Date]))) <=$(=Max([Proc Date]))"}>}[Amount]) = 0,Below(rangesum(above(sum({$<[Proc Date]={">=$(=YearStart(Max([Proc Date]))) <=$(=Max([Proc Date]))"}>}[Amount]),0,RowNo())), rangesum(above(sum({$<[Proc Date]={">=$(=YearStart(Max([Proc Date]))) <=$(=Max([Proc Date]))"}>}[Amount]),0,RowNo()))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
ananyaghosh
Creator III
Creator III
Author

Hi,

Your solution does not work for me and it behave like same as before.

Thanks,

Sandip

Anil_Babu_Samineni

May be change it to Above rather Below ??

If(sum({$<[Proc Date]={">=$(=YearStart(Max([Proc Date]))) <=$(=Max([Proc Date]))"}>}[Amount]) = 0,Above(rangesum(above(sum({$<[Proc Date]={">=$(=YearStart(Max([Proc Date]))) <=$(=Max([Proc Date]))"}>}[Amount]),0,RowNo())), rangesum(above(sum({$<[Proc Date]={">=$(=YearStart(Max([Proc Date]))) <=$(=Max([Proc Date]))"}>}[Amount]),0,RowNo()))


For me, it's working with out change the script?

Capture.PNG

Pivot table?

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
ananyaghosh
Creator III
Creator III
Author

hi,

I got the below data set at column CUM after I have used your set analysis:

   

YTDCUM
217430217,430.00
24859.97242,289.97
0242,289.97
3014.883,014.88
03,014.88
03,014.88
4003,414.88
2127828.452,131,243.33
02,131,243.33
02,131,243.33
7048.612,138,291.94
51502,143,441.94
1675367.7

1,675,367.70


  and you can see that for last row and 4th row it is not working. So any suggestion for this?

Thanks,

Sandip