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
KevinGesquiere
Frequent Visitor

Date Relationship Not Recognized?

Hi all,

 

Maybe a stupid question, but I can't figure out why it's not working correctly.

I have 2 tables, a date table which I created using DAX (Date = CALENDAR (DATE(2000;1;1); DATE(2025;12;31))) and a data table imported from Excel. My data table has 2 colmns, an unique number (text value) and a datefield. There is a relationship between the date field in the data table and the date table. I have added a measure in the data table to count the number of rows. 

 

Capture.PNG

 

When I now want to the Number of ABCs over the different months, it's giving me this result. It looks like the relationship is not working, I think, but I'm not sure. Any idea how this can be solved or what I'm doing wrong?

 

Capture.PNG

 

2 ACCEPTED SOLUTIONS

Yeah, except I don't see a time component in your images and you aren't displaying it. By default, every time in a default CALENDAR table is 12:00:00 AM. I am thinking that perhaps your time component in your other table doesn't match. I would change the formatting to be sure.



Follow on LinkedIn
@ 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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

Hi Greg,

 

Thanks! This was indeed the problem. I thought formatting both dates to Date (d/MM/yyyy) would work, but I had no clue that the time part of these dates still matter if it was formatted as date (d/MM/yyyy).

 

Kr, Kevin

View solution in original post

5 REPLIES 5
Greg_Deckler
Community Champion
Community Champion

Make sure that both colums are either both Date or both Date/Time.



Follow on LinkedIn
@ 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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi Greg,

 

Thanks for your respons. But the fact is that they are both Date/Time. Any other suggestions why this problem is coming up?

 

Capture.PNGCapture.PNG

Yeah, except I don't see a time component in your images and you aren't displaying it. By default, every time in a default CALENDAR table is 12:00:00 AM. I am thinking that perhaps your time component in your other table doesn't match. I would change the formatting to be sure.



Follow on LinkedIn
@ 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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi Greg,

 

Thanks! This was indeed the problem. I thought formatting both dates to Date (d/MM/yyyy) would work, but I had no clue that the time part of these dates still matter if it was formatted as date (d/MM/yyyy).

 

Kr, Kevin

Yep, I've been bitten by that one myself, so that's why I know!



Follow on LinkedIn
@ 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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

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.