Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys, probably an easy one.
Given this table:
I need to accumulate the measure Vekt pr row pr KODE. THe first row is added to the second, the new second value is added to the third. And so forth. But on RowNo = 25 (new KODE) it should start over again.
Pls advice.
See attached documents.
Best regards
Trond E
Try this:
Aggr(RangeSum(Above(Sum(Vekt),0, RowNo())), KODE, RowNO)
Change in Script:
Table:
LOAD RowNo() as RowNO,
KODE as KODE1,
EmneKode,
Rangering,
[=FUNNET_VEKT] as Vekt,
[=EmneKode]
FROM
[CH08_20160218_170244.xls]
(biff, embedded labels, table is Sheet1$);
FinalTable:
LOAD RowNO,
KODE1 as KODE,
EmneKode,
Rangering,
Vekt,
[=EmneKode]
Resident Table
Order By KODE1;
DROP Table Table;
Output:
Try this:
Aggr(RangeSum(Above(Sum(Vekt),0, RowNo())), KODE, RowNO)
Change in Script:
Table:
LOAD RowNo() as RowNO,
KODE as KODE1,
EmneKode,
Rangering,
[=FUNNET_VEKT] as Vekt,
[=EmneKode]
FROM
[CH08_20160218_170244.xls]
(biff, embedded labels, table is Sheet1$);
FinalTable:
LOAD RowNO,
KODE1 as KODE,
EmneKode,
Rangering,
Vekt,
[=EmneKode]
Resident Table
Order By KODE1;
DROP Table Table;
Output:
Thank you very much!
Best regards
Trond Erik
There is also a chart solution, at least for straight table (where you can hide columns)