Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am importing the following data
Test1:
LOAD * INLINE [
Test1.Year, Test1.Month, p_type, Amount
2021, 01, a, 10
2021, 01, b, 8
2021, 02, a, 3
2021, 02, a, 5
2021, 02, b, 10
2021, 03, a, 9
2021, 03, a, 10
2021, 03, b, 7
2021, 03, b, 6
];
Is it possible, during the loading script to add a calculated column that represent the the cumulated value but only for one p_type ?
What I want to obtain is the following table :
Year | Month | p_type | Amount | Cumul Amount |
2021 | 1 | a | 10 | 10 |
2021 | 1 | b | 8 | 8 |
2021 | 2 | a | 3 | 13 |
2021 | 2 | a | 5 | 18 |
2021 | 2 | b | 10 | 18 |
2021 | 3 | a | 9 | 27 |
2021 | 3 | a | 10 | 37 |
2021 | 3 | b | 7 | 25 |
2021 | 3 | b | 6 | 31 |
Hi
You will be able to achieve this by applying an order on load and using the Peek function.
Mark
Thanks for your hint,
I have the following (satisfactory) solution:
Hi
You will be able to achieve this by applying an order on load and using the Peek function.
Mark
Thanks for your hint,
I have the following (satisfactory) solution: