Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
I'm trying to set up a rolling date table and need for it to start on a specific date (April 1, 2024). This is the DAX equation that I was that I have and need help with what needs to be added or modified. Thanks!
DateTAfterApr2024 =
VAR MinYear = YEAR (DATE(2024,04,01 ) )
VAR MaxYear = YEAR ( TODAY())
RETURN
ADDCOLUMNS (
FILTER (
CALENDARAUTO( ),
AND ( YEAR ( [Date] ) >= MinYear, YEAR ( [Date] ) <= MaxYear )
),
"Calendar Year", "CY " & YEAR ( [Date] ),
"Month Name", FORMAT ( [Date], "mmmm" ),
"Month Number", MONTH ( [Date] ),
"Month Year", format([Date],"mmm yyyy"),
"Month year Sort", format([Date],"YYYYMM"),"Calendar Quarter/Year", QUARTER( [Date] )&"/"&YEAR ( [Date] ))
Solved! Go to Solution.
Hi @meredink91 ,
Thanks for the reply from lbendlin .
Please try this syntax, which I modified based on your measure:
DateTAfterApr2024 =
VAR StartDate = DATE(2024, 04, 01)
VAR EndDate = TODAY()
RETURN
ADDCOLUMNS(
FILTER(
CALENDAR(StartDate, EndDate),
AND(
YEAR([Date]) >= YEAR(StartDate),
YEAR([Date]) <= YEAR(EndDate)
)
),
"Calendar Year", "CY " & YEAR([Date]),
"Month Name", FORMAT([Date], "mmmm"),
"Month Number", MONTH([Date]),
"Month Year", FORMAT([Date], "mmm yyyy"),
"Month year Sort", FORMAT([Date], "YYYYMM"),
"Calendar Quarter/Year", "Q" & QUARTER([Date]) & "/" & YEAR([Date])
)
I replaced the CALENDARAUTO function with CALENDAR to create a date table based on the conditions you gave.
If you have any other questions please feel free to contact me.
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Hi @meredink91 ,
Thanks for the reply from lbendlin .
Please try this syntax, which I modified based on your measure:
DateTAfterApr2024 =
VAR StartDate = DATE(2024, 04, 01)
VAR EndDate = TODAY()
RETURN
ADDCOLUMNS(
FILTER(
CALENDAR(StartDate, EndDate),
AND(
YEAR([Date]) >= YEAR(StartDate),
YEAR([Date]) <= YEAR(EndDate)
)
),
"Calendar Year", "CY " & YEAR([Date]),
"Month Name", FORMAT([Date], "mmmm"),
"Month Number", MONTH([Date]),
"Month Year", FORMAT([Date], "mmm yyyy"),
"Month year Sort", FORMAT([Date], "YYYYMM"),
"Calendar Quarter/Year", "Q" & QUARTER([Date]) & "/" & YEAR([Date])
)
I replaced the CALENDARAUTO function with CALENDAR to create a date table based on the conditions you gave.
If you have any other questions please feel free to contact me.
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
If it needs to start on a specific day then it is not a rolling table.
You can use CALENDAR("2024-04-01",TODAY())
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 20 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 32 | |
| 31 | |
| 18 | |
| 12 | |
| 11 |