In Power Query I have a PeriodID column that starts at 1 and increases by 1 every 28 days, so each fiscal period has a unique number. I am trying to find a way to convert these numbers to periods, so it will repeat number 1 through 13 every year. Here is my current code:
Table.AddColumn(#"Added Custom7", "PeriodID", each if ([Index]>=2157 and [Index]<=2191) then 78 else Number.RoundDown(([Index]-1)/28)+1)
*P13 of 2017 has 5 weeks so I had to put the if statement in there.
Would it be easier to do this in power pivot? or is there a function that will allow me to "reset" count for each new fiscal year?
Table.AddColumn(#"Added Custom7", "PeriodID", each if ([Index]>=2157 and [Index]<=2191) then 78 else Number.RoundDown(([Index]-1)/28)+1)
*P13 of 2017 has 5 weeks so I had to put the if statement in there.
Would it be easier to do this in power pivot? or is there a function that will allow me to "reset" count for each new fiscal year?