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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
iDataDrew
Advocate IV
Advocate IV

Calendar is not showing all dates in table when I add a date field from another table

There is a 1-* relationship that exists between my Date/Calendar table and the Projects table, which contains the ProjectStartDate.  When I add the ProjectStartDate field into a table with the Date field, gaps show up in the Date field, even though dates exist in that field for the ProjectStartDate.  If anything, I would expect gaps in the ProjectStartDate field and, of course, dates should be listed in both columns when there are matches in both fields.  Any ideas on why this is happening?

 

dateerror.png

1 ACCEPTED SOLUTION

Aha! I think I see your issue. Your dates have start and stop times in them. But, when you create a calendar table, you will get everything as 12:00:00 AM. So, if the times don't match up, no relationship. I'm guessing this is the issue. So, you would want to create a column in each table that is only the date or you would create a column in your Project table that is the date with a time of 12:00:00 AM and use that as the relationship to your Calendar table.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

6 REPLIES 6
Greg_Deckler
Super User
Super User

Are you sure you have 2019 dates in your Calendar table?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler Yes.  The calendar table goes until 2020.

Any way to share your data or your file? Difficult to recreate.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler Here's a dropbox link to the file.  Let me know if you have any problems accessing it.

Aha! I think I see your issue. Your dates have start and stop times in them. But, when you create a calendar table, you will get everything as 12:00:00 AM. So, if the times don't match up, no relationship. I'm guessing this is the issue. So, you would want to create a column in each table that is only the date or you would create a column in your Project table that is the date with a time of 12:00:00 AM and use that as the relationship to your Calendar table.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

I formatted the dates as Date in report view but not in the Query Editor.  After formatting them as Date in the Query Editor the issue went away.  Thanks for your help!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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