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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Aree
Resolver I
Resolver I

Blanks being returned in Calendar (Dates) Table

I built a simple calendar table which runs from 2018 to 2025.

Now I am building columns to calculate the Financial Period (month) and Year. 

My function basically adds 6 months and then aggregated either the month number or Year as the result.

In a weird twist of faith the tail end of my dates table refuse to use this calculation, is there a limitation that i am unaware of?

These blanks that are being returned are causing chaos as it prevents me from using the sort by function... 😞

 

dates table.PNG

1 ACCEPTED SOLUTION

Have some thinking I will have to just use an IF statement to test for blanks and then adjust the function is it exist.

FY Year = IF( ISBLANK(DATEADD('Dates 2'[Date], +6, MONTH)),  YEAR(DATEADD('Dates 2'[Date], -6, MONTH)) +1, YEAR(DATEADD('Dates 2'[Date], +6, MONTH)))

View solution in original post

2 REPLIES 2
Aree
Resolver I
Resolver I

Quick update further some testing.

There seems to be a limitation that seems to created when you generate a Calendar table.

It prevents you from calculating dates outside of that table range. 

I know this sounds crazy but here is a second test

The Dates Column is sorted in ascending order and using a simple date add function to calculate the date -1 month generates a blank when the result is outside of the inital range of the table i.e. before July-2017.

 

dates table 2.PNG

 

Have some thinking I will have to just use an IF statement to test for blanks and then adjust the function is it exist.

FY Year = IF( ISBLANK(DATEADD('Dates 2'[Date], +6, MONTH)),  YEAR(DATEADD('Dates 2'[Date], -6, MONTH)) +1, YEAR(DATEADD('Dates 2'[Date], +6, MONTH)))

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.