Require help with incremental load when dimension changes
I'm sturggling to get my code to work. Please help me out guys. The issue is that i want to increase the value of the dimension "NewField" everytime the LineNr changes also the field "Controll" is there to let me know when i should increase the the value of the dimension. The red defines how it should be done. Honestly the Peek function for NewField is not working at all, only the rangesum gives me any result.
'Journey' as Fact,
if(Controll=1, RangeSum(1, peek(NewField)+1),
if(Controll=0, RangeSum(1, peek(NewField)), Peek(NewField))) as NewField,
if(Previous(_KEY_ProductID_TS_LineNr) = _KEY_ProductID_TS_LineNr, 0, 1) as Controll