Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
William2
Contributor III
Contributor III

Conditional Rangesum Above

Hello Community, 

I am struggeling with Rangesum Above. 

Let's say I have table like: 

RowNo(); Path; Quantity

1;A; 1

2;AB;1

3;AC;2

4;ABC;2

5;ACD;3

6;ABCD;5

If I Rangesum like Rangesum(Above(Sum(Quantity),0,Rowno()))

I get the sum over all 6 Rows like this:

RowNo(); Path; Quantity;Rangesum

1;A; 1;1

2;AB;1;2

3;AC;2;4

4;ABC;2;6

5;ACD;3;9

6;ABCD;5;14

But I want to achive that sum is only on Path that wildmatch like this:

RowNo(); Path; Quantity;Rangesum

1;A; 1;1

2;AB;1;2

3;AC;2;3

4;ABC;2;4

5;ACD;3;6

6;ABCD;5;9

I need to do this in front end. 

Is this even possible? Please any suggestens?

Best regards Will

 

Labels (1)
2 Replies
vinieme12
Champion III
Champion III

what exactly is the condition??

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
William2
Contributor III
Contributor III
Author

Hallo Vineeth, 

thanks for reply. 

Condition is the Path. Or better, Path defines the Aggr range. 

RowNo 5 should sum row 5, 3, 1

Because Path of row 5 is ACD and row 3 is AC and Row 1 is A. These are the SubPath of row 5

RowNo 6 should sum row 6, 4, 2, 1. 

Hope this helps. 

Best regargs Will