Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to modify the below script to use in Straight Table AS EXPRESSION but not getting an idea how Can I apply the same logic without Peek and Previous as these are not working in Straight Table :
if(Previous(Value)>4 and Value>4,PROFIT,
if(-rangesum((Value>4),(peek(Value,-1)>4),(peek(Value,-2)>4),(peek(Value,-3)>4),(peek(Value,-4)>4),(peek(Value,-5)>4),(peek(Value,-6)>4))>=4,'Highly PROFIT,
if(-rangesum((Value<3),(peek(Value,-1)<3),(peek(Value,-2)<3),(peek(Value,-3)<3),(peek(Value,-4)<3),(peek(Value,-5)<3),(peek(Value,-6)<3))>=6,'Low PROFIT',
'LOSS''))) as CLASSES.
I AM USING DATE AS DIMENSION.
THE REQUIREMNT IS TO MARK EACH DATE WITH CLASSIFICATION AS ABOVE DOING 7 DAYS SLIDING WINODWS CALCULATION.
The 7 day logic means a cell is classified according to if in the last 7 days the classification logic comes out TRUE. So for each day you must look at the 6 days previous to the day + the day considered (total of 7 days) and then do the logic and decide which classification is TRUE for that day.
Can you please advice/suggest the workaround.
My suggestion was to post a qvw file with representative data and the objects which you want to populate, as well as the expected output for these objects...
Dear Jonathan,
PFA the qvw with data ,variables and formulas and the expected output.
Team,
Can you please advice as per the qvw attached?