Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
i need to calculates incremental for latest 5 week in script..
please reply soon
LOAD
Distinct
Week
From ABC where ?;
Present data is Week :201434,201435,201436,201437,201438,201439
Required data is Week : 201438,201439 only
Try like:
Temp:
Load
Max(Week, 5) as LFifthWeek
From <>;
Let vWeek=Peek('LFifthWeek');
Drop Table Temp;
Final:
Load
...
Week
From <> Where Week >=$(vWeek);
Try like:
Temp:
Load
Max(Week, 5) as LFifthWeek
From <>;
Let vWeek=Peek('LFifthWeek');
Drop Table Temp;
Final:
Load
...
Week
From <> Where Week >=$(vWeek);
Hi
Try this
A:
Load Max(WeekNum) as Max;
Load *,Right(Week,2) as WeekNum Inline [
Week
201434
201435
201436
201437
201438
201439
];
Let vMax = Peek('Max',-1,A);
B:
Load * Inline [
Week
201434
201435
201436
201437
201438
201439
]
Where Right(Week,2)>=($(vMax)-1) and Right(Week,2)<=$(vMax);
Hope it helps you..
Hi Rahul
I have tried to make the solution , Let me know this is hat you are looking for
Thanks
Priyal