Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have the foll script as below:
Do while vCurrYear>=vYearToLoad
[Temp Data Output Aggr]:
Load
Region,
City,
[Check week] ,
[Booking Year] as [Year],
Count([BookingID]) as [Bookings]
Resident [Tmp Data Output]
Where [Booking Year]=$(vCurrYear)
Group By Region,City,
[Check week]
[Booking Year]
Order By
Region,City,
[Check week]
[Booking Year];
Let vCurrYear=($(vCurrYear)-1);
loop;
//in my case loops thru 3 times, 2015, 2014 and 2013
STORE
Region,
City,
[Check week] ,
[Year],
[Bookings]
FROM [Temp Data Output Aggr] INTO [$(vOutfileAggr)](txt);
I need the output as below:
Region City Check week Year Bookings
Mauritius CAT 1 2013 34
Mauritius CAT 1 2014 36
Mauritius CAT 1 2015 38
Mauritius CAT 2 2013 32
Can someone assist.
I am currently getting as below:
Region City Check week Year Bookings
Mauritius CAT 1 2015 38
Mauritius CAT 2 2015 37
Mauritius CAT 3 2015 31
Thanks in advance.
Hi,
Can you paste the dashboard log?
Can you please explain ?
Why do you need the LOOP here?
[Temp Data Output Aggr]:
Load
Region,
City,
[Check week] ,
[Booking Year] as [Year],
Count([BookingID]) as [Bookings]
Resident [Tmp Data Output]
Where [Booking Year] >= $(vYearToLoad)
Group By Region,City,
[Check week]
[Booking Year]
Order By
Region,City,
[Check week]
[Booking Year];
//in my case loops thru 3 times, 2015, 2014 and 2013
STORE
Region,
City,
[Check week] ,
[Year],
[Bookings]
FROM [Temp Data Output Aggr] INTO [$(vOutfileAggr)](txt);
Thanks.. that's the correct answer. It works perfect..