
Re: Want to create Week Bucket Dimension in the script
Vinay kumar Bangari Aug 7, 2015 3:07 PM (in response to Vinay kumar Bangari)@Massimo Grossi

Re: Want to create Week Bucket Dimension in the script
Sunny Talwar Aug 7, 2015 3:08 PM (in response to Vinay kumar Bangari)Not sure if I understand Vinay, but can't you just do this:
If(Even(Week), YearWeek & YearWeek + 1, YearWeek  1 & YearWeek) as NewColumn

Re: Want to create Week Bucket Dimension in the script
Vinay kumar Bangari Aug 7, 2015 3:12 PM (in response to Sunny Talwar )Sunny That does not work , what i wanted to is i want to group two weeks at a time as new dimension..

Re: Want to create Week Bucket Dimension in the script
Sunny Talwar Aug 7, 2015 3:12 PM (in response to Sunny Talwar )or this if you need & between them:
If(Even(Week), YearWeek & '&' & YearWeek + 1, YearWeek  1 & '&' & YearWeek) as NewColumn

Re: Want to create Week Bucket Dimension in the script
Vinay kumar Bangari Aug 7, 2015 3:15 PM (in response to Sunny Talwar )remember for one week means you will include 7 days, 1 month means 30 or 31 days.. now i want to create a new dimension with two week numbers

Re: Want to create Week Bucket Dimension in the script
Vinay kumar Bangari Aug 7, 2015 3:22 PM (in response to Vinay kumar Bangari)any help


Re: Want to create Week Bucket Dimension in the script
Vinay kumar Bangari Aug 7, 2015 3:34 PM (in response to Sunny Talwar )Wow amazing ...In the similar manner can we create 3 more columns with 3 week , 4 week and 5 week buckets respectively..

Re: Want to create Week Bucket Dimension in the script
Sunny Talwar Aug 7, 2015 3:37 PM (in response to Vinay kumar Bangari)I think it can be done. Just need to know how they will be grouped?
my current logic for 2 weeks was if week is even week then week & week + 1, but if its odd week then week1 and week.
What are the logic for other combinations?

Re: Want to create Week Bucket Dimension in the script
Vinay kumar Bangari Aug 7, 2015 3:42 PM (in response to Sunny Talwar )Please see the output how it should look like

week bucket output.xls 24.5 K


Re: Want to create Week Bucket Dimension in the script
Sunny Talwar Aug 7, 2015 3:54 PM (in response to Sunny Talwar )Try this:
Table:
LOAD DayOfYear,
SnapShotDate,
Week,
Year,
YearWeek,
If(Even(Week) = 1, YearWeek & '&' & (YearWeek + 1), YearWeek  1 & '&' & YearWeek) as [2Weeks],
If(Mod(AutoNumber(Week), 3) = 1, YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2),
If(Mod(AutoNumber(Week), 3) = 2, (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1),
(YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek)) as [3Weeks],
If(Mod(AutoNumber(Week), 4) = 1, YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2) & '&' & (YearWeek + 3),
If(Mod(AutoNumber(Week), 4) = 2, (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2),
If(Mod(AutoNumber(Week), 4) = 3, (YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1),
(YearWeek  3) & '&' & (YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek))) as [4Weeks]
FROM
[week bucket output.xls]
(biff, embedded labels, table is Sheet1$);
The code will need some modifications based on your need.
HTH
Best,
Sunny

Community_175831.qvw 167.5 K

Re: Want to create Week Bucket Dimension in the script
Vinay kumar Bangari Aug 7, 2015 4:00 PM (in response to Sunny Talwar )For the 3rd week and 4th week bucket the week should should start from week 201434 ...not from 201431... like dynamically it should take the minimum week as first week..


Re: Want to create Week Bucket Dimension in the script
Vinay kumar Bangari Aug 7, 2015 4:11 PM (in response to Sunny Talwar )pLEASE check this QVW file am i missing anything

Week Bucket.qvw 162.0 K

Re: Want to create Week Bucket Dimension in the script
Sunny Talwar Aug 7, 2015 4:15 PM (in response to Vinay kumar Bangari)I don't have a licensed version of QlikView, so can't really open the file you are sharing. Can you share the script, if you have made any changes to it and a screenshot of the table box object?
One thing to note here is that, you will need your data to be sorted in a correct order. So if it isn't sorted in Ascending order by SnapShotDate, I would recommend doing the 2Weeks, 3Weeks and 4Weeks calculation in preceding load or resident load with the order by statement.

Re: Want to create Week Bucket Dimension in the script
Vinay kumar Bangari Aug 7, 2015 4:21 PM (in response to Sunny Talwar )Attached is the excel sheet and scripy
Test:
LOAD DayOfYear,
SnapShotDate,
Week,
Year,
YearWeek,
If(Even(Week) = 1, YearWeek & '' & (YearWeek + 1), YearWeek  1 & '' & YearWeek) as [2Weeks],
If(Mod(AutoNumber(Week), 3) = 1, YearWeek & '' & (YearWeek + 1) & '' & (YearWeek + 2),
If(Mod(AutoNumber(Week), 3) = 2, (YearWeek  1) & '' & YearWeek & '' & (YearWeek + 1),
(YearWeek  2) & '' & (YearWeek  1) & '' & YearWeek)) as [3Weeks],
If(Mod(AutoNumber(Week), 4) = 1, YearWeek & '' & (YearWeek + 1) & '' & (YearWeek + 2) & '' & (YearWeek + 3),
If(Mod(AutoNumber(Week), 4) = 2, (YearWeek  1) & '' & YearWeek & '' & (YearWeek + 1) & '' & (YearWeek + 2),
If(Mod(AutoNumber(Week), 4) = 3, (YearWeek  2) & '' & (YearWeek  1) & '' & YearWeek & '' & (YearWeek + 1),
(YearWeek  3) & '' & (YearWeek  2) & '' & (YearWeek  1) & '' & YearWeek))) as [4Weeks]
FROM
[C:\Users\kumarv\Desktop\Calendar Week.xls]
(biff, embedded labels, table is Sheet1$);

Calendar Week.xls 45.5 K

Re: Want to create Week Bucket Dimension in the script
Sunny Talwar Aug 7, 2015 4:28 PM (in response to Vinay kumar Bangari)See if this is what you want:
Table:
LOAD DayOfYear,
SnapShotDate,
Week,
Year,
YearWeek
FROM
[Calendar Week.xls]
(biff, embedded labels, table is Sheet1$);
[Final Table]:
LOAD *,
If(Even(Week) = 1, YearWeek & '&' & (YearWeek + 1), YearWeek  1 & '&' & YearWeek) as [2Weeks],
If(Mod(AutoNumber(Week), 3) = 1, YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2),
If(Mod(AutoNumber(Week), 3) = 2, (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1),
(YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek)) as [3Weeks],
If(Mod(AutoNumber(Week), 4) = 1, YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2) & '&' & (YearWeek + 3),
If(Mod(AutoNumber(Week), 4) = 2, (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2),
If(Mod(AutoNumber(Week), 4) = 3, (YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1),
(YearWeek  3) & '&' & (YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek))) as [4Weeks]
Resident Table
Order By SnapShotDate;
DROP Table Table;

Community_175831.qvw 163.5 K



Re: Want to create Week Bucket Dimension in the script
Vinay kumar Bangari Aug 7, 2015 4:24 PM (in response to Sunny Talwar )yup got it brother , thanks a lot .

Re: Want to create Week Bucket Dimension in the script
Sunny Talwar Aug 7, 2015 4:29 PM (in response to Vinay kumar Bangari)Awesome
I am glad it worked out.
Best,
Sunny

Re: Want to create Week Bucket Dimension in the script
Vinay kumar Bangari Aug 7, 2015 4:32 PM (in response to Sunny Talwar )Yaar one last thing yaar.. sorry to disturb your sleep... can i have script for 5, 6,7 8, 9 and 10 weeks bucket.. i know i am asking too much but..

Re: Want to create Week Bucket Dimension in the script
Sunny Talwar Aug 7, 2015 4:34 PM (in response to Vinay kumar Bangari)My daughter is keeping me up and not you.. so you don't have anything to worry about .
I am working on it

Re: Want to create Week Bucket Dimension in the script
Vinay kumar Bangari Aug 7, 2015 4:35 PM (in response to Sunny Talwar )super cool .. she and i are friends.. we have each others back .

Re: Want to create Week Bucket Dimension in the script
Vinay kumar Bangari Aug 7, 2015 4:55 PM (in response to Sunny Talwar )Any luck brother..


Re: Want to create Week Bucket Dimension in the script
Sunny Talwar Aug 7, 2015 4:58 PM (in response to Vinay kumar Bangari)Try this:
Table:
LOAD DayOfYear,
SnapShotDate,
Week,
Year,
YearWeek
FROM
[Calendar Week.xls]
(biff, embedded labels, table is Sheet1$);
[Final Table]:
LOAD *,
If(Even(Week) = 1, YearWeek & '&' & (YearWeek + 1), YearWeek  1 & '&' & YearWeek) as [2Weeks],
If(Mod(AutoNumber(Week), 3) = 1, YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2),
If(Mod(AutoNumber(Week), 3) = 2, (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1),
(YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek)) as [3Weeks],
If(Mod(AutoNumber(Week), 4) = 1, YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2) & '&' & (YearWeek + 3),
If(Mod(AutoNumber(Week), 4) = 2, (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2),
If(Mod(AutoNumber(Week), 4) = 3, (YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1),
(YearWeek  3) & '&' & (YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek))) as [4Weeks],
If(Mod(AutoNumber(Week), 5) = 1, YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2) & '&' & (YearWeek + 3) & '&' & (YearWeek + 4),
If(Mod(AutoNumber(Week), 5) = 2, (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2) & '&' & (YearWeek + 3),
If(Mod(AutoNumber(Week), 5) = 3, (YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2),
If(Mod(AutoNumber(Week), 5) = 4, (YearWeek  3) & '&' & (YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1),
(YearWeek  4) & '&' & (YearWeek  3) & '&' & (YearWeek  2) & '&' & (YearWeek  1) & '&' & (YearWeek))))) as [5Weeks],
If(Mod(AutoNumber(Week), 6) = 1, YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2) & '&' & (YearWeek + 3) & '&' & (YearWeek + 4) & '&' & (YearWeek + 5),
If(Mod(AutoNumber(Week), 6) = 2, (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2) & '&' & (YearWeek + 3) & '&' & (YearWeek + 4),
If(Mod(AutoNumber(Week), 6) = 3, (YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2) & '&' & (YearWeek + 3),
If(Mod(AutoNumber(Week), 6) = 4, (YearWeek  3) & '&' & (YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2),
If(Mod(AutoNumber(Week), 6) = 5, (YearWeek  4) & '&' & (YearWeek  3) & '&' & (YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1),
(YearWeek  5) & '&' & (YearWeek  4) & '&' & (YearWeek  3) & '&' & (YearWeek  2) & '&' & (YearWeek  1) & '&' & (YearWeek)))))) as [6Weeks],
If(Mod(AutoNumber(Week), 7) = 1, YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2) & '&' & (YearWeek + 3) & '&' & (YearWeek + 4) & '&' & (YearWeek + 5) & '&' & (YearWeek + 6),
If(Mod(AutoNumber(Week), 7) = 2, (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2) & '&' & (YearWeek + 3) & '&' & (YearWeek + 4) & '&' & (YearWeek + 5),
If(Mod(AutoNumber(Week), 7) = 3, (YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2) & '&' & (YearWeek + 3) & '&' & (YearWeek + 4),
If(Mod(AutoNumber(Week), 7) = 4, (YearWeek  3) & '&' & (YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2) & '&' & (YearWeek + 3),
If(Mod(AutoNumber(Week), 7) = 5, (YearWeek  4) & '&' & (YearWeek  3) & '&' & (YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2),
If(Mod(AutoNumber(Week), 7) = 6, (YearWeek  5) & '&' & (YearWeek  4) & '&' & (YearWeek  3) & '&' & (YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1),
(YearWeek  6) & '&' & (YearWeek  5) & '&' & (YearWeek  4) & '&' & (YearWeek  3) & '&' & (YearWeek  2) & '&' & (YearWeek  1) & '&' & (YearWeek))))))) as [7Weeks],
If(Mod(AutoNumber(Week), 8) = 1, YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2) & '&' & (YearWeek + 3) & '&' & (YearWeek + 4) & '&' & (YearWeek + 5) & '&' & (YearWeek + 6) & '&' & (YearWeek + 7),
If(Mod(AutoNumber(Week), 8) = 2, (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2) & '&' & (YearWeek + 3) & '&' & (YearWeek + 4) & '&' & (YearWeek + 5) & '&' & (YearWeek + 6),
If(Mod(AutoNumber(Week), 8) = 3, (YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2) & '&' & (YearWeek + 3) & '&' & (YearWeek + 4) & '&' & (YearWeek + 5),
If(Mod(AutoNumber(Week), 8) = 4, (YearWeek  3) & '&' & (YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2) & '&' & (YearWeek + 3) & '&' & (YearWeek + 4),
If(Mod(AutoNumber(Week), 8) = 5, (YearWeek  4) & '&' & (YearWeek  3) & '&' & (YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2) & '&' & (YearWeek + 3),
If(Mod(AutoNumber(Week), 8) = 6, (YearWeek  5) & '&' & (YearWeek  4) & '&' & (YearWeek  3) & '&' & (YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2),
If(Mod(AutoNumber(Week), 8) = 7, (YearWeek  6) & '&' & (YearWeek  5) & '&' & (YearWeek  4) & '&' & (YearWeek  3) & '&' & (YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1),
(YearWeek  7) & '&' & (YearWeek  6) & '&' & (YearWeek  5) & '&' & (YearWeek  4) & '&' & (YearWeek  3) & '&' & (YearWeek  2) & '&' & (YearWeek  1) & '&' & (YearWeek)))))))) as [8Weeks],
If(Mod(AutoNumber(Week), 9) = 1, YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2) & '&' & (YearWeek + 3) & '&' & (YearWeek + 4) & '&' & (YearWeek + 5) & '&' & (YearWeek + 6) & '&' & (YearWeek + 7) & '&' & (YearWeek + 8),
If(Mod(AutoNumber(Week), 9) = 2, (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2) & '&' & (YearWeek + 3) & '&' & (YearWeek + 4) & '&' & (YearWeek + 5) & '&' & (YearWeek + 6) & '&' & (YearWeek + 7),
If(Mod(AutoNumber(Week), 9) = 3, (YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2) & '&' & (YearWeek + 3) & '&' & (YearWeek + 4) & '&' & (YearWeek + 5) & '&' & (YearWeek + 6),
If(Mod(AutoNumber(Week), 9) = 4, (YearWeek  3) & '&' & (YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2) & '&' & (YearWeek + 3) & '&' & (YearWeek + 4) & '&' & (YearWeek + 5),
If(Mod(AutoNumber(Week), 9) = 5, (YearWeek  4) & '&' & (YearWeek  3) & '&' & (YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2) & '&' & (YearWeek + 3) & '&' & (YearWeek + 4),
If(Mod(AutoNumber(Week), 9) = 6, (YearWeek  5) & '&' & (YearWeek  4) & '&' & (YearWeek  3) & '&' & (YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2) & '&' & (YearWeek + 3),
If(Mod(AutoNumber(Week), 9) = 7, (YearWeek  6) & '&' & (YearWeek  5) & '&' & (YearWeek  4) & '&' & (YearWeek  3) & '&' & (YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2),
If(Mod(AutoNumber(Week), 9) = 8, (YearWeek  7) & '&' & (YearWeek  6) & '&' & (YearWeek  5) & '&' & (YearWeek  4) & '&' & (YearWeek  3) & '&' & (YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1),
(YearWeek  8) & '&' & (YearWeek  7) & '&' & (YearWeek  6) & '&' & (YearWeek  5) & '&' & (YearWeek  4) & '&' & (YearWeek  3) & '&' & (YearWeek  2) & '&' & (YearWeek  1) & '&' & (YearWeek))))))))) as [9Weeks],
If(Mod(AutoNumber(Week), 10) = 1, YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2) & '&' & (YearWeek + 3) & '&' & (YearWeek + 4) & '&' & (YearWeek + 5) & '&' & (YearWeek + 6) & '&' & (YearWeek + 7) & '&' & (YearWeek + 8) & '&' & (YearWeek + 9),
If(Mod(AutoNumber(Week), 10) = 2, (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2) & '&' & (YearWeek + 3) & '&' & (YearWeek + 4) & '&' & (YearWeek + 5) & '&' & (YearWeek + 6) & '&' & (YearWeek + 7) & '&' & (YearWeek + 8),
If(Mod(AutoNumber(Week), 10) = 3, (YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2) & '&' & (YearWeek + 3) & '&' & (YearWeek + 4) & '&' & (YearWeek + 5) & '&' & (YearWeek + 6) & '&' & (YearWeek + 7),
If(Mod(AutoNumber(Week), 10) = 4, (YearWeek  3) & '&' & (YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2) & '&' & (YearWeek + 3) & '&' & (YearWeek + 4) & '&' & (YearWeek + 5) & '&' & (YearWeek + 6),
If(Mod(AutoNumber(Week), 10) = 5, (YearWeek  4) & '&' & (YearWeek  3) & '&' & (YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2) & '&' & (YearWeek + 3) & '&' & (YearWeek + 4) & '&' & (YearWeek + 5),
If(Mod(AutoNumber(Week), 10) = 6, (YearWeek  5) & '&' & (YearWeek  4) & '&' & (YearWeek  3) & '&' & (YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2) & '&' & (YearWeek + 3) & '&' & (YearWeek + 4),
If(Mod(AutoNumber(Week), 10) = 7, (YearWeek  6) & '&' & (YearWeek  5) & '&' & (YearWeek  4) & '&' & (YearWeek  3) & '&' & (YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2) & '&' & (YearWeek + 3),
If(Mod(AutoNumber(Week), 10) = 8, (YearWeek  7) & '&' & (YearWeek  6) & '&' & (YearWeek  5) & '&' & (YearWeek  4) & '&' & (YearWeek  3) & '&' & (YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1) & '&' & (YearWeek + 2),
If(Mod(AutoNumber(Week), 10) = 9, (YearWeek  8) & '&' & (YearWeek  7) & '&' & (YearWeek  6) & '&' & (YearWeek  5) & '&' & (YearWeek  4) & '&' & (YearWeek  3) & '&' & (YearWeek  2) & '&' & (YearWeek  1) & '&' & YearWeek & '&' & (YearWeek + 1),
(YearWeek  9) & '&' & (YearWeek  8) & '&' & (YearWeek  7) & '&' & (YearWeek  6) & '&' & (YearWeek  5) & '&' & (YearWeek  4) & '&' & (YearWeek  3) & '&' & (YearWeek  2) & '&' & (YearWeek  1) & '&' & (YearWeek)))))))))) as [10Weeks]
Resident Table
Order By SnapShotDate;
DROP Table Table;

Community_175831.qvw 173.2 K

Re: Want to create Week Bucket Dimension in the script
Vinay kumar Bangari Aug 7, 2015 5:03 PM (in response to Sunny Talwar )Thanks a bunch.. now you can sleep brother..

















Re: Want to create Week Bucket Dimension in the script
Antonio Mancini Aug 7, 2015 4:55 PM (in response to Vinay kumar Bangari)Hi Vinay,
another way without changing script.
You can select YearWeek and select Num of columns by slider.
If You want to see all weeks then remove set analysis from expression
Regards,
Antonio

Week Bucket.qvw 160.8 K

Re: Want to create Week Bucket Dimension in the script
Vinay kumar Bangari Aug 7, 2015 4:58 PM (in response to Antonio Mancini)hi ANtonia,
very interesting, that is really good. But i have plenty of data.. i prefer to in the backend.. Thanks a lot for your help brother..

Re: Want to create Week Bucket Dimension in the script
Vinay kumar Bangari Aug 7, 2015 4:58 PM (in response to Antonio Mancini)you are always a great help for me .
