Forum Discussion

KevinGesquiere's avatar
KevinGesquiere
Frequent Visitor
8 years ago
Solved

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. 

 

 

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?

 

 

  • Greg_Deckler's avatar
    Greg_Deckler
    8 years ago

    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.

  • 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

5 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

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

    • KevinGesquiere's avatar
      KevinGesquiere
      Frequent Visitor

      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?

       

      • Greg_Deckler's avatar
        Greg_Deckler
        Community Champion

        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.