Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi There,
I looking to get a solution where I can have a row counter that would reset if a new parent list is loaded
e.g. like follows
main mem mem no counter
1000 5 1
1000 6 2
1000 7 3
1000 8 4
1001 9 1
1001 10 2
1001 11 3
1001 12 1
1001 13 2
I'm trying to do this on load as I need to do some calculations on an expression.
Thanks,
Kevin.
Apologies. I gave the example incorrectly. It should be
main mem mem no counter
1000 5 1
1000 6 2
1000 7 3
1000 8 4
1001 9 1
1001 10 2
1001 11 3
1002 12 1
1002 13 2
Thanks,
Kevin.
Hi Kevin,
Something like this would work to bring that value into a Members table:
Left Join (Members)
Load
"main mem",
"mem no",
if("main mem" = Previous("main mem"),
Peek('counter', -1) + 1,
1) As counter
Resident Members
Order by "main mem", "mem no";
Stephen
Hi Kevin,
here are an working example.
Steven is on the same track.
Have a nice weekend!
Rainer
Thanks guys.
Just what I needed
Kevin.
How do i achieve Runningsum (communicative Sum of 12 months) using load script ?
Following is the expression i am using to create RunningSum in QV however i want to push this expression to load script. Please help !
RangeSum
(above(Sum([Actual Demand]),0,12))
Date | Actual Demand | RunningSum |
1 | 23 | 23 |
2 | 34 | 57 |
3 | 56 | 113 |
4 | 34 | 147 |
5 | 56 | 203 |
6 | 76 | 279 |
7 | 34 | 313 |
8 | 87 | 400 |
9 | 756 | 1156 |
10 | 34 | 1190 |
11 | 876 | 2066 |
12 | 343 | 2409 |
13 | 2345 | 4731 |
14 | 89 | 4786 |
15 | 45 | 4775 |
16 | 344 | 5085 |
17 | 786 | 5815 |
18 | 343 | 6082 |
19 | 978 | 7026 |
20 | 343 | 7282 |
21 | 23 | 6549 |
22 | 567 | 7082 |
23 | 45 | 6251 |
24 | 34 | 5942 |
25 | 23 | 3620 |
26 | 56 | 3587 |
27 | 78 | 3620 |