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
gabilamarcks
Regular Visitor

Date Relationship not working

Hi all,

 

I have a table wich contains all the engagements and associated Create Date. I want to create visuals that show engagements grouped by FiscalYear. To do that I created another table having columns Date and its associated FiscalYear. A relationship was created between the 2.

pb.jpg

 

However, when I go to my visuals, all the engagements are getting a FiscalYear value as blank.

pb2.jpg

 

Can you pls help me?

 

1 ACCEPTED SOLUTION

Yes did. I got a solution for it. It was a problem of not matching data type. But I had to create a calculated column having data type as "Date" from the original "Data/Time" column, for some reason I was getting an error in all rows just chaging the data type in the original column, so this extra column was needed. After creating this new column I updated the relantioship between the two and it works now. Thanks much.

View solution in original post

8 REPLIES 8

@gabilamarcks Check the datatypes in both the "Edit Queries" section as well as the model. Make sure they match. If that doesn't work, does the date value exist in both tables?


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

Thank you for this a year and some months later! I had the data type correct in the model but not the query.  

Indeed the data types were different when I went to "Edit Queries". I adjusted both for Date/Time in the queries and the models. Still doesnt work. I am sure there are matching data values in both tables.

@gabilamarcks did you "Close and Apply" the change?


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

Yes did. I got a solution for it. It was a problem of not matching data type. But I had to create a calculated column having data type as "Date" from the original "Data/Time" column, for some reason I was getting an error in all rows just chaging the data type in the original column, so this extra column was needed. After creating this new column I updated the relantioship between the two and it works now. Thanks much.

aoberlander
Frequent Visitor

If you double click on the relationship line what does it look like?

That will help in getting a better understanding of the issue.

There we go

pb3.jpg

Anonymous
Not applicable

Almost certainly the problem is your CreatedDate also has a time.  Even if not "displayed" that way.  You need to strip those off.

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.