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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
DataSkills
Helper II
Helper II

Userelationship not giving expected results

Hi, 

 

I am attemping to use the "Userelationship" function in DAX to utilise an inactive relationship as per THIS youtube instruction video from Sam McKay. 

 

I have replicated this using a basic model (attached in Google Drive - click the download icon at top right to save). This model has a date table and a fact table with Name, DateRecorded, DateOccurred and Qty. 

 

The active relationship is Date.Date-->Fact.DateOccurred. There is an inactive relationship between Date.Date-->Fact.DateRecorded. 

DataSkills_0-1695391994203.png

As per the video instructions, I have set up 2 measures - one using the primary relationship (Qty by DateOccurred) and the other using the inactive relationship (Qty by DateRecorded). 

 

However, when I put these into a table, I am not getting the results I expected.  In my table, I have the Date.Date field, the Qty field (summed), and then the 2 measures. I was expecting to see differences in the Qty by DateOccurred measure and the Qty by DateRecorded measure, but this is not the case. 

DataSkills_1-1695392078358.png

DataSkills_3-1695392286756.png

What I would have expected is something like this:

DateQty by DateOccurredQty by DateRecorded
28 October 2016637 
13 December 2016874637

 

 What am I doing wrong? Thank you in advance...

1 ACCEPTED SOLUTION
OwenAuger
Super User
Super User

Hi @DataSkills 

Change the inactive relationship to 1:many single-directional (same as the active relationship) and this should fix it.


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

View solution in original post

3 REPLIES 3
DataSkills
Helper II
Helper II

After that change, here is what my table looks like:

 

DataSkills_0-1695633490871.png

 

DataSkills
Helper II
Helper II

Thank you @OwenAuger ! 

I didn't even notice that little (but crucial) detail! I made the mistake of assuming PBI would get that right automatically. 

OwenAuger
Super User
Super User

Hi @DataSkills 

Change the inactive relationship to 1:many single-directional (same as the active relationship) and this should fix it.


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
Twitter
LinkedIn

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.