Forum Discussion
JulianTobon
9 years agoHelper I
Function To Calculate Fiscal Week
Hi all, I want to calculate the number of weeks based on the date of sale, I used the formula: week = WEEKNUM(Scorecard[SalesDate],2) This works very well but not for what I need, Due to work ...
JulianTobon
9 years agoHelper I
JulianTobon
9 years agoHelper I
Phil_Seamark excuseme, Your form is a little more successful, what I can detect in it is that it starts the count of the week on Sunday, but it should start on Monday. We have to indicate that in the Formula?
- freshwave8 years agoHelper I
For me this worked perfectly. For crossing over the Calendar Year you need to subtract one.
WeeKFY2 = VAR WeekStartinFY = WEEKNUM ( DATE ( Calendario[FiscalYear], 7, 1 ), 2 ) RETURN IF ( Calendario[WeeK] < WeekStartinFY, WeekStartinFY + Calendario[WeeK] - 1, Calendario[WeeK] - WeekStartinFY + 1 ) - freshwave8 years agoHelper I
I was able to get the same results in Power Query with the following code:
InsertFiscalWeek = Table.AddColumn(PreviousItem, "FiscalWeek", each if [Week] < Date.WeekOfYear(#date([FiscalYear], 7, 1))
then [Week] + Date.WeekOfYear(#date([FiscalYear], 7, 1)) - 1
else [Week] - Date.WeekOfYear(#date([FiscalYear], 7, 1)) + 1, Int64.Type) - Hanuma7 years agoRegular Visitor
JulianTobon Hi ,
Please share the solution if you have the solution for the fiscal week starts with monday
thanks