Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
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
)
User | Count |
---|---|
12 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
24 | |
19 | |
14 | |
10 | |
7 |