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
Hi,
I created a calendar table in Dax with this formula. When i check my table, its fine i obtain all my dates.
But i but the filed date inside a slicer, it shows me date until 31 december 2023 whereas i have a table that finish at 06/01/2023.
Someone can help me ?
Thank you
thank you @amitchandak
But i need to create that in a table separately because i am also using in the application function like Samelastperiod() .
If i am not using Date hierarchy theses functions didnt work for me.
Also i need to connect few tables to that Calendar table.
So how can i do ? I need to create a new table in Power query ? or in DAX but in my table created by the calendar function (Where i cannot add another column as far as i know) ?
Thank you for your help
@menphis21 , If you are using date hierarchy, do not use that. Create column like month, year etc in date table and use those
Calendar = Addcolumns(calendar(date(2021,01,01), Max(LastUpdates[Last Update Date]) ), "Month no" , month([date])
, "Year", year([date])
, "Month Year", format([date],"mmm-yyyy")
, "Month year sort", year([date])*100 + month([date])
, "Qtr Year", format([date],"yyyy-\QQ")
, "Qtr", quarter([date])
, "Month",FORMAT([Date],"mmmm")
, "Month sort", month([DAte])
, "Is Today" ,if([Date]=TODAY(),"Today",[Date]&"")
,"Day of Year" , datediff(date(year([DAte]),1,1), [Date], day)+1
, "Month Type", Switch( True(),
eomonth([Date],0) = eomonth(Today(),-1),"Last Month" ,
eomonth([Date],0)= eomonth(Today(),0),"This Month" ,
Format([Date],"MMM-YYYY") )
,"Year Type" , Switch( True(),
year([Date])= year(Today()),"This Year" ,
year([Date])= year(Today())-1,"Last Year" ,
Format([Date],"YYYY")
)
)
Sort the date in date calendar and check what is max date.
HI @amitchandak ,
Thank you. But if i am not using the hierarchy date, function like Sameperiodlastyear didn't work.
Do you have a solution ?
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 |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 46 |