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
khaycock
Helper I
Helper I

Calendar relationship not working

I can't figure out for the life of me why this calendar relationship isn't working.

 

This is my calendar code:

Calendar = ADDCOLUMNS(


CALENDAR("2019, 04, 01"," 2022, 03, 31"),


"Year", YEAR([Date]),


"Month Year Num", CONCATENATE(YEAR([Date]), FORMAT([Date],"MMM")),


"Month Num", Month([Date]),


"Month", FORMAT([Date], "MMM"),


"Quarter Num",FORMAT([Date], "Q"),


"Quarter", CONCATENATE("Q",FORMAT([Date], "Q")),


"Day", FORMAT([Date],"D"),


"Week", CONCATENATE("Week ",FORMAT([Date], "WW"))
)

 And I'm trying to connect date to my created date column in another table.

 

Both have the exact same data format and they genuinely do match up, so I have no idea why the relationship isn't working!

 

created format.PNGdate field format.PNG

I've used the exact same calendar table in other reports and it works fine so can anyone help figure out why this one doesn't?

relationship.PNG

 

Any help would be great thanks 🙂

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@khaycock 

You have Date and Time in the Created column, remove time from the created column then it should work.

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

3 REPLIES 3
Fowmy
Super User
Super User

@khaycock 

You have Date and Time in the Created column, remove time from the created column then it should work.

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

mahoneypat
Employee
Employee

Both columns are datetime format, and the time component does not match, which is why it isn't working.  If possible, you should convert both the type Date.

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


I have the exact same issue. I did convert both relationship columns (in this case Date & created) into Date Type format yet it does not work. 

 

Am I missing something? Is it necessary to have every single date from Calender table to have a record in Ticket table? I have wider date range in Calender table (Jan 2019 - Dec 2025) however data in Ticket table is only from Jun 2019 - Dec 2021. Does this impact the relationship in anyway?

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.