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
Anonymous
Not applicable

Use Different Date Relationship

Hello,

 

I have a fact table and a date table in my model. The fact table contains two date columns of interest: "Pick-Up Date" and "Order Completed Date". For one matrix in the report, I have to slice on the year of "Pick-Up Date" . For another matrix in the report I have to slice on the year of "Order Completed Date". The relationship between my date table and my facts table is between "Fact[Order Completed Date]" and "Date[Date]". How can I slice on the years of "Pick-up date" via my date table (which btw of course contains a year column)? I know of USERELATIONSHIP but I don't see how to implement that here. Should I just use the auto-date hierarchy or create a calculated column in my fact table containing the year or "Pick-up date"?


Thanks in advance 🙂 

3 REPLIES 3
amitchandak
Super User
Super User

If you need both dates to work on the same date. join them with a common date dimension. Refer to the article it has all the steps.

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

 

 

Anonymous
Not applicable

Thank your reply. However what I want to do is in one matrix use as columns the year dimension for pick-up date, and in another matrix use the year dimension corresponding to "Order Completed Date". Now, because the active relationship is between my date field in the date table and the "order completed date", if I drag the year dimension from my date table to columns it slices on the "order completed date". But in another matrix that is not what I want. I also want to use years as columns but these years should represent the years of the "pick up date" which has an inactive relationship with the date column of the date table. How do I use years referring to "pick up date" as columns in my matrix when the active relationship is with another date column in my fact table ("Order Completed Date")?

@Anonymous ,

 

Please share some sample data and clarify more details about the expected result.

 

Regards,

Jimmy Tao

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.