Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
subbareddykm
Creator II
Creator II

difference

Hi all,

I want build one logic i,e I have a data like below file.

Logic is In col2 i have level type ,If i m in A1 level i dont want diff, if i enter into nxt level means A2 iwant to take diff above of record..

Output i want is :

 

ColCol2Col3Col4Output
AA100
AA11232
AA11235
AA1122
AA11537
AA21539
AA217412
AA218410
AA218454
AA219450
AA320538
AA321530
Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

May be this:

=If(Aggr(NODISTINCT RowNo(), Col, Col2) > 1, RangeSum(Sum(Col4) - Above(TOTAL Sum(Col4))))


Capture.PNG

View solution in original post

3 Replies
sunny_talwar
MVP
MVP

How are you getting this 4? Is that correct or typo?

Capture.PNG

subbareddykm
Creator II
Creator II
Author

ColCol2Col3Col4OutputLogic
AA100
AA11232
AA11235
AA1122
AA11537
AA21539237-39
AA21741239-41
AA21841041-41
AA21845441-45
AA21945045-45
AA32053845-53
AA32153053-53
sunny_talwar
MVP
MVP

May be this:

=If(Aggr(NODISTINCT RowNo(), Col, Col2) > 1, RangeSum(Sum(Col4) - Above(TOTAL Sum(Col4))))


Capture.PNG