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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi,
I have created a custom calendar and when I try to put the date field in the slicer - it returns blank values. Tried different slicer settings, tried changing the date format but nothing worked. Below is my code and the screenshots of the error.
Calendar =
VAR FirstFiscalMonth = 7
VAR FirstYear = 2019
RETURN
GENERATE(
FILTER(
CALENDARAUTO(6),
YEAR([Date]) >=FirstYear && [Date] <= TODAY()
),
VAR Yr = YEAR([Date])
VAR Mn = MONTH([Date])
VAR Qr = QUARTER([Date])
VAR Fyr = Yr+1 *(FirstFiscalMonth > 1 && Mn >= FirstFiscalMonth)
VAR FQr = FORMAT(EOMONTH([Date],1-FirstFiscalMonth), "\QQ")
VAR FMn = IF(Mn >= FirstFiscalMonth,Mn-6,Mn+6)
RETURN ROW(
//"CYear",YEAR([Date]),
//"CMonth Number",Mn,
//"Month",FORMAT([Date],"mmmm"),
//"CYear Month Number",YEAR([Date]) *100 + MONTH([Date]),
//"Year Month", FORMAT([Date],"mmm") & " "&YEAR([Date]),
"Fiscal Month", FMn,
"Fiscal Year Quarter",FQr & "-" & Fyr,
"Fiscal Quarter",FQr,
"Fiscal Year", Fyr))
Would appreciate any help! Thanks!
Solved! Go to Solution.
Hi @Anonymous - Your powerbi file is working. Although I realised the issue is because of a relationship between the calendar and a table I have. I worked around it and the issue has been resolved! Thank you for your help.
Hi @srv1092
You can switch to Table view to check whether the calendar table is populated with data correctly. If it does have data there, it should be used in slicers without any problem. If there is no data and there is no error prompting, you can try refreshing the whole report from Home > Refresh.
In addition, try replacing CALENDARAUTO function with CALENDAR function and providing a definite start date and end date for the calendar table. Below is an example.
Hope this would be helpful.
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
Thank you for the answer @Anonymous . I changed the slicer to table view and I cannot see data. I also tried changing calenderauto to calendar as suggested, but am yet experiencing the same error.
Hi @Anonymous - Your powerbi file is working. Although I realised the issue is because of a relationship between the calendar and a table I have. I worked around it and the issue has been resolved! Thank you for your help.