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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi,
I'm trying to use the CALENDAR function to create a dynamic calendar table. Here is my DAX:
TimelineDates = CALENDAR(DATE([SelectedYear],01,01),DATE([SelectedYear],12,31))
[SelectedYear] is a measure I created
SelectedYear = SELECTEDVALUE(TimelineYear[Year])
I have a slicer where I select the year, the slicer field is Timeline[Year]
I know the measure is working because I added the results to a Card and it returns the selected year from the slicer perfectly.
However, when I add the measure to the CALENDAR function it isn't working. The Calendar creates a date range with the year being 1900, this leads me to belive that the measure is being seen as a 0 in the CALENDAR function.
I also thought maybe I needed to convert the mesaure result to a VALUE so I tried this:
TimelineDates = CALENDAR(DATE(VALUE([SelectedYear]),01,01),DATE(VALUE([SelectedYear]),12,31))
The results are still the same as before, see picture below.
Is what I'm trying to do possible? If not is there another way?
Thank you,
-Justair07
Hello @Justair07,
Please note that SELECTEDVALUE doesn't work for calculated columns and tables.
Hi @rajulshah ,
I was afraid of that. Do you know of another way I can achive my overall goal? Another method to create a dynamic calender based on a slicer selection?
Thank you
-Justair07
Hi @rajulshah,
I might not understand the difference between a physical table and a table so forgive me but my initial thought is either should work. I have a calander already created entirley from M in the Power Query Editor. My goal was to have the dynamic calender only show a date range for a single year based on the slicer selection. Hope this answers your question.
Thank you,
-Justair07
Darn. Well thank you. I'll leave this posted for another day or so as unsolved to see if someone has an idea of how to do this.
Thank you for all of your help!
-Justair07
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.