Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
leandroparischi
Frequent Visitor

Relationship between dates

Hi, some time ago I made a CALENDARAUTO() table for date reference. I use in every project i work (dCalendario)


But when I need to create a relationship between dCalendario.Date and table1.DueDate my DueDate field loses his Date type and show as Text type.

I cant use the fields Year or Month from dCalendario because their dont reference my DueDate.

 

Any idea to solve this? Thanks and sorry for my bad english

1 ACCEPTED SOLUTION
v-lionel-msft
Community Support
Community Support

Hi @leandroparischi ,

 

Like this?

v-lionel-msft_0-1596509391782.png

After creating relationship

v-lionel-msft_1-1596509412895.png

This is normal. After the relationship is created using the date column, only the date column of one of the tables can use the hierarchy. You can do more tests yourself.

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

8 REPLIES 8
v-lionel-msft
Community Support
Community Support

Hi @leandroparischi ,

 

Like this?

v-lionel-msft_0-1596509391782.png

After creating relationship

v-lionel-msft_1-1596509412895.png

This is normal. After the relationship is created using the date column, only the date column of one of the tables can use the hierarchy. You can do more tests yourself.

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

az38
Community Champion
Community Champion

@leandroparischi 

maybe it would be better to create some surrogate date key in both of tables with the same format with Power Query?

like "YYYYMMDD" formatted as text 

Text.Combine({Text.From(Date.Year([Date])), Text.From(Date.Month([Date])), Text.From(Date.Day([Date]))})

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
amitchandak
Super User
Super User

@leandroparischi , Change the data type in edit query mode . If not under column property

Data Format New Rib.png

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Greg_Deckler
Super User
Super User

@leandroparischi - That's really odd. Have you tried setting your columns in both tables back to Date or 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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler I tried do this in my DueDate field.

In Power Query, the Due Date field is categorized as a Date type. Shows the date icon and etc.

In the Column Tools tab, it shows the type as Date as well.

But it is not working as a date field and I believe that is the reason for my dCalendario table can't use DueDate field as reference.

@leandroparischi - I was thinking to try it in the "Column Tools" section of the ribbon when in Report view.



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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

@leandroparischi , can share some sample screenshot

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Sure.DueDate.png

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.