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
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.


@ 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

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
Super User
Super User

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


@ 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...

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.


@ 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...

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!


@ 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...

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.