Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Augmenting data by week

Hi all,   I have a table like that PERIOD         PLANT          TYPE 201801             A                 X 201801             B                 Y Actually the table and values not imp...
  • Stachu's avatar
    Stachu
    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?