Forum Discussion
Augmenting data by week
- 7 years ago
if you just need 52 weeks for each entry then it's simple:
1) in the query editor add a new column (name it WeekNr) with this syntax:
{1..52}2) expand the values to rows
3) create a new column which is
[Period]*100+[WeekNr]
4) remove unnecessary columns
EDIT what I don't get is that you say that you want it as in real calendar - if that's the case why do you need week 51 for 201201 which to me seems to be January 2012? it only had 5 weeks at most. Or is it not related to month?
This table doesn't display the requested data. I create it for just show. It's demo.
I have a period column which start 201201 to today (201811 -always last month ) and i want to augment it for 52 weeks. In summary i want to multiply each row data with 52 weeks. I want it like real calendar
For example
Period : 201201
20120101
20120102
.
.
.
20120151
20120152
Actually i don't know how to do in query editor
if you just need 52 weeks for each entry then it's simple:
1) in the query editor add a new column (name it WeekNr) with this syntax:
{1..52}2) expand the values to rows
3) create a new column which is
[Period]*100+[WeekNr]
4) remove unnecessary columns
EDIT what I don't get is that you say that you want it as in real calendar - if that's the case why do you need week 51 for 201201 which to me seems to be January 2012? it only had 5 weeks at most. Or is it not related to month?