Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I have the following DAX for an automated calendar:
Hi @elois33 ,
You can try this:
CALENDAR = ADDCOLUMNS(
CALENDAR(date(2022,1,1),date(2022,12,31)),
"YEAR",YEAR([Date]),
"QUARTER",ROUNDUP(MONTH([Date])/3,0),
"MONTH",MONTH([Date]),
"WEEKNUM",WEEKNUM([Date]),
"YEAR-QUARTER",YEAR([Date]) & "Q" & ROUNDUP(MONTH([Date])/3,0),
"YEAR-MONTH",YEAR([Date])*100+MONTH([Date]),
"YEAR-WEEK",YEAR([Date])*100+WEEKNUM([Date]),
"WEEKDAY",WEEKDAY([Date])
)
Best Regards,
Gallen Luo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you @amitchandak for this helpful post! Indeed very interesting! I was looking if there is a way to make it easier to modify because we chang the starting date every year. So I was hoping finding something with DATESBETWEEN where my colleuges can have easily access and modify if any need. For example IF(DATESBETWEEN(Calendar[year],11/12/2022,11/12/2023), "S2023"
IF(DATESBETWEEN(Calendar[year],12/12/2023,13/12/2024), "S2024"
Thank you!
@elois33 , refer if these two can help
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
97 | |
80 | |
67 | |
63 |
User | Count |
---|---|
146 | |
110 | |
107 | |
86 | |
63 |