Forum Discussion
Sheelaaryal
2 years agoFrequent Visitor
Weeknum for accounting period
How to calculate the week number based on the accounting periods, I have accounting periods 1, 2, 3, ...12 in my data and I am looking to calculate the number of weeks in each accounting period. ...
- 2 years ago
is this what you want?
weeknum =var _first=CALCULATE(min('Table'[Date]),ALLEXCEPT('Table','Table'[accountin period]))return rounddown(('Table'[Date]-_first)/7,0)+1pls see the attachment below
Sheelaaryal
2 years agoFrequent Visitor
Sure, I have accounting period and date column in my data like below and for output I am looking for Weeknum restarting at each accounting period like WeekNum Column
Sheelaaryal
2 years agoFrequent Visitor
Also I used this and this works for some of the periods and does not for some
WeekNum = RANKX(FILTER('Table',[Period]=EARLIER('Table'[Period])),WEEKNUM([Date],2),,ASC,Dense)