This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreGet Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.
Hello,
Can someone please help me to modify this date table? I am looking for this date table to end dynamically at the end of last month rather than full year.
DATE =
VAR MINYEAR = (YEAR(TODAY())) - 4
VAR MAXYEAR = YEAR(TODAY())
--VAR MAXMONTH = if (YEAR(TODAY() = 2022 MONTH(TODAY())-1
return
ADDCOLUMNS(
FILTER(
CALENDARAUTO(),
YEAR ( [DATE]) >= MINYEAR && YEAR ( [DATE]) <= MAXYEAR
),
"Year", YEAR([Date]),
"Month", MONTH([Date]),
"YearMonth", FORMAT([Date],"yyyymm"),
"Month Label", FORMAT([Date],"mmm"),
"QKey", QUARTER([Date])
)Thanks,
RK
Solved! Go to Solution.
Thanks. I had to just modify your formula a little bit to make it work. Thanks for your help.
CALENDAR( DATE( YEAR(TODAY())-4,1,1), EOMONTH(TODAY(), -1)),
Instead of CALENDARAUTO and filtering on years you could try CALENDAR( DATE( YEAR(TODAY()-4),1,1), EOMONTH(TODAY(), -1))
Thanks. I had to just modify your formula a little bit to make it work. Thanks for your help.
CALENDAR( DATE( YEAR(TODAY())-4,1,1), EOMONTH(TODAY(), -1)),
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 22 | |
| 22 | |
| 21 | |
| 21 | |
| 16 |
| User | Count |
|---|---|
| 55 | |
| 54 | |
| 46 | |
| 26 | |
| 24 |