Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi all,
I have the following DAX code to generate a calendar.
Solved! Go to Solution.
hi @lucie_rabochova ,
try like:
DimDates =
VAR BaseCalendar =
CALENDAR(DATE(2022,1,1), TODAY())
RETURN
FILTER(
GENERATE(
BaseCalendar,
VAR BaseDate = [Date]
VAR YearDate = YEAR(BaseDate)
VAR Week = WEEKNUM(BaseDate,2)-1
RETURN
ROW (
"Year",YearDate,
"YearMonth",FORMAT(BaseDate,"yyyy-mm"),
"Quarter", FORMAT(BaseDate, "\Quarter q"),
"Weeknumber",WEEKNUM (BaseDate,2),
"YearWeeknumber", FORMAT(BaseDate,"yyyy") &"-"& FORMAT(WEEKNUM (BaseDate,2),"00")
)
),
[Weeknumber]<>53
)
Thank you, works perfect!
hi @lucie_rabochova ,
try like:
DimDates =
VAR BaseCalendar =
CALENDAR(DATE(2022,1,1), TODAY())
RETURN
FILTER(
GENERATE(
BaseCalendar,
VAR BaseDate = [Date]
VAR YearDate = YEAR(BaseDate)
VAR Week = WEEKNUM(BaseDate,2)-1
RETURN
ROW (
"Year",YearDate,
"YearMonth",FORMAT(BaseDate,"yyyy-mm"),
"Quarter", FORMAT(BaseDate, "\Quarter q"),
"Weeknumber",WEEKNUM (BaseDate,2),
"YearWeeknumber", FORMAT(BaseDate,"yyyy") &"-"& FORMAT(WEEKNUM (BaseDate,2),"00")
)
),
[Weeknumber]<>53
)
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
71 | |
38 | |
21 | |
20 | |
13 |
User | Count |
---|---|
125 | |
40 | |
32 | |
27 | |
24 |