Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hi,
I have to calculate fiscal week depending upon the Day Number which is Monday it should be the first day of the week.
I used this formula but here it is using Day Name I want to convert into Day Number becuase this logic will work on any condition if there is a language change it will not affect the formula.
New Winter Week =
--Inputs--
VAR WeekStartsOn = "Mon"
VAR FiscalStartMonth = 11
--Calculation--
VAR FiscalFirstDay =
IF(
MONTH(Dates[Date]) < FiscalStartMonth,
DATE(
YEAR(Dates[Date])-1,
FiscalStartMonth,
1
),
DATE(
YEAR(Dates[Date]),
FiscalStartMonth,
1
)
)
VAR FilteredTableCount =
COUNTROWS(
FILTER(
SELECTCOLUMNS(
GENERATESERIES(
FiscalFirstDay,
Dates[Date]
),
"Dates",
[Value]
),
FORMAT([Dates],"ddd") = WeekStartsOn
)
)
VAR WeekNos =
IF(
FORMAT(FiscalFirstDay,"ddd") <> WeekStartsOn,
FilteredTableCount + 1,
FilteredTableCount
)
RETURN
WeekNos
WeekStartsOn should be Monday and it should calculate the weeks accordingly till 53 or 52..
I am kinda unable to change the formula like that and Help?
@amitchandak
I would recommend you use an external calendar table (for example maintained in an Excel file in a Sharepoint) for anything with fiscal calendars and especially fiscal weeks.
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 48 | |
| 40 | |
| 38 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 68 | |
| 66 | |
| 29 | |
| 26 | |
| 25 |