Forum Discussion
Fiscal Week Reset
- 4 years ago
Hi StephenGW ,
Please check if this could meet your requirements:
FY = IF ( [Date] >= DATE ( [Year], 1, 3 ) && [Date] <= DATE ( [Year] + 1, 1, 2 ), "FY" & RIGHT ( [Year], 2 ), "FY" & RIGHT ( [Year] - 1, 2 ) )FW = RANKX ( FILTER ( FiscalWeek, FiscalWeek[FY] = EARLIER ( FiscalWeek[FY] ) ), [FW_Index], , ASC, DENSE )Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
StephenGW , In DAX if you want
Week No = var _1= QUOTIENT(DATEDIFF(STARTOFYEAR('Date'[Date], "1/31"),'Date'[Date],DAY),7)+1 return _1
or
Week No =
Var _st = if(month([Date]) <2 , date(year([Date])-1,2,1) , date(year([Date]),2,1) )
var _1= QUOTIENT(DATEDIFF(_st,'Date'[Date],DAY),7)+1
return _1
I tried both of these and they are not working how I need them to. Here are some screenshots to see if you can see what might be wrong.
Start:
Starting over:
Second Dax:
Maybe it's because of the start of my table? It starts at 2021 which started on 1/3/21 and ends on 1/2/22 so that is all included in my 2021 fiscal year. Any ideas?