Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have use case where i want to input value and carry the same value until new input value entered.
Can some body advice me how to do this with Rangesum function or any other functions like above()
Input Data
INPUTFIELD PriceInput;
LOAD * INLINE [
PERIODID, Price ,PriceInput
201501, 10 ,0
201502, 15 ,0
201503, 20 ,0
201504, 10 ,0
201505, 30 ,0
201506, 25 ,0
];
Desired O/P:
PERIODID | Price | PriceInput | NewPrice |
201501 | 10 | 15 | 15 |
201502 | 15 | 0 | 15 |
201503 | 20 | 0 | 15 |
201504 | 10 | 10 | 10 |
201505 | 30 | 0 | 10 |
201506 | 25 | 0 | 10 |
In the above example if i enter value 15 at PriceInput at Period 201501 then it should carry forward untill new value 10 entered at 201504.
and same 10 has to carry forward all the way upto new value entered.
Thanks
can any one advice on this?
Hi,
one solution could be:
hope this helps
regards
Marco
Hi Marco,
Thanks, I just added one more dimension to the table called ID and if i do sort on PERIOD ID then it is not working and probably i we need to add some aggregation function.
If Sort by ID then it is working properly but when we change sort order to ID then not not
!
Hi Marco,
This works for me when only one dimension with Period and when adding additional dimension and sorting by period then above function not working.