Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
srv1092
Frequent Visitor

Custom calendar date showing blank when being used in a slicer

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))

 

 

srv1092_0-1716465626148.png

srv1092_1-1716465647597.png

Would appreciate any help! Thanks!

1 ACCEPTED 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.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

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. 

vjingzhanmsft_0-1716527693183.png

 

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. 

vjingzhanmsft_1-1716527942053.png

 

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. 

Anonymous
Not applicable

It looks weird.

I create a calendar table with your DAX using CALENDAR and add two date slicers as below. Both work well. I have attched the pbix file, please download it and check whether it works at your side. 

vjingzhanmsft_0-1716540529961.png

 

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.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.