Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 :
Col | Col2 | Col3 | Col4 | Output |
A | A1 | 0 | 0 | |
A | A1 | 12 | 32 | |
A | A1 | 12 | 35 | |
A | A1 | 12 | 2 | |
A | A1 | 15 | 37 | |
A | A2 | 15 | 39 | |
A | A2 | 17 | 41 | 2 |
A | A2 | 18 | 41 | 0 |
A | A2 | 18 | 45 | 4 |
A | A2 | 19 | 45 | 0 |
A | A3 | 20 | 53 | 8 |
A | A3 | 21 | 53 | 0 |
May be this:
=If(Aggr(NODISTINCT RowNo(), Col, Col2) > 1, RangeSum(Sum(Col4) - Above(TOTAL Sum(Col4))))
How are you getting this 4? Is that correct or typo?
Col | Col2 | Col3 | Col4 | Output | Logic |
A | A1 | 0 | 0 | ||
A | A1 | 12 | 32 | ||
A | A1 | 12 | 35 | ||
A | A1 | 12 | 2 | ||
A | A1 | 15 | 37 | ||
A | A2 | 15 | 39 | 2 | 37-39 |
A | A2 | 17 | 41 | 2 | 39-41 |
A | A2 | 18 | 41 | 0 | 41-41 |
A | A2 | 18 | 45 | 4 | 41-45 |
A | A2 | 19 | 45 | 0 | 45-45 |
A | A3 | 20 | 53 | 8 | 45-53 |
A | A3 | 21 | 53 | 0 | 53-53 |
May be this:
=If(Aggr(NODISTINCT RowNo(), Col, Col2) > 1, RangeSum(Sum(Col4) - Above(TOTAL Sum(Col4))))