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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
Dash7
Frequent Visitor

Calendar table problem (blanks)

I have a table that contains columns: TASKID, created_on, Implemented_on.  As you probably know, column Implemented_on can maintain empty cells.
anyway I want to create simple visual, tasks created vs tasks implemented in period of time.

I created calendar table, but problem is it does not shows even date on the x line.

Dash7_0-1705933011927.png

 


I tried to create few calendar tables using below codes:

_Calendar = 
ADDCOLUMNS(
    FILTER(
    CALENDAR(
        MIN('table'[Created]),
        MAX('table'[Implemented On])
    ),
    NOT(ISBLANK(MIN('table'[Implemented On])))
)
      
    ,
    "Year", YEAR([Date]),
    "Month", CONVERT(MONTH([Date]), INTEGER),
    "Month name", FORMAT([Date], "mmmm"),
    "Month short", FORMAT([Date], "mmm"),
    "Weeknumber", WEEKNUM([Date], 21),
    "Quarter", QUARTER([Date]),
    "Day", DAY([Date]),
    "Day name", FORMAT([Date], "dddd"))
   

or 

Calendar = 
ADDCOLUMNS(
ADDCOLUMNS(
CALENDAR(MIN('table'[created]),
    MAX('table'[implemented on])),
"Year",YEAR([Date]),
"Month",CONVERT(MONTH([Date]),INTEGER),
"Month name",FORMAT([Date],"mmmm"),
"Month short", FORMAT([Date],"mmm"),
"Weeknumber",WEEKNUM([Date],21),
"Quarter",QUARTER([Date]),
"Day",DAY([Date]),
"Day name",FORMAT([Date],"dddd")),
"Year Month", [Year]&IF([Month]<10,"0"&[Month],[Month]))

or even 

_CALENDAR_TABLE = 
VAR __startDate = DATE ( 2021, 1, 1 ) 
VAR __endDate = DATE ( YEAR ( TODAY() ), 12, 31 ) 
VAR __dates = CALENDAR ( __startDate, __endDate )
RETURN
ADDCOLUMNS (
    __dates,
    "Year",             YEAR ( [Date] ),
    "Month Number",     MONTH ( [Date] ),
    "Month Name",       FORMAT ( [Date], "MMMM" ), 
    "Month",            FORMAT( [Date], "MMM, YYYY" ), 
    "Month Sort",       FORMAT( [Date], "YYYY-MM" ),
    "Quarter",          "Q" & FORMAT( [Date], "Q, YYYY" ),
    "Quarter Sort",     FORMAT ( [Date], "YYYY-Q" )
)

All tables i tried to connect with the main table with created/implemented on columns or both at once
Could anyone help me how to solve that? (important thing, I do not want to duplicate rows)

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Dash7 

 

This blank issue is not caused by the calendar table. As column Implemented_on can maintain empty cells, if you add measures/columns related to Implemented_on dates to the chart, the empty date values will be aggregated to the "Blank" column as you showed in the picture. 

 

As a workaround, you need to filter out those empty date values in measures. For example, 

Implemented No. = CALCULATE(COUNT('Table'[TaskID]),NOT(ISBLANK('Table'[Implemented_on])),USERELATIONSHIP(_CALENDAR_TABLE[Date],'Table'[Implemented_on]))

Note that I use USERELATIONSHIP function in this measure because I created the relationship between these two columns as inactive. 

vjingzhanmsft_0-1705981176400.png

 

I created a demo pbix with the last calendar table code you offered. You can download it to see the details. 

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

 

View solution in original post

3 REPLIES 3
Dash7
Frequent Visitor

@Anonymous  thank you very much for help. It works perfectly! 

Anonymous
Not applicable

Hi @Dash7 

 

This blank issue is not caused by the calendar table. As column Implemented_on can maintain empty cells, if you add measures/columns related to Implemented_on dates to the chart, the empty date values will be aggregated to the "Blank" column as you showed in the picture. 

 

As a workaround, you need to filter out those empty date values in measures. For example, 

Implemented No. = CALCULATE(COUNT('Table'[TaskID]),NOT(ISBLANK('Table'[Implemented_on])),USERELATIONSHIP(_CALENDAR_TABLE[Date],'Table'[Implemented_on]))

Note that I use USERELATIONSHIP function in this measure because I created the relationship between these two columns as inactive. 

vjingzhanmsft_0-1705981176400.png

 

I created a demo pbix with the last calendar table code you offered. You can download it to see the details. 

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

 

Ritaf1983
Super User
Super User

Hi @Dash7 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.