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

USERELATIONSHIP Strange behavior !!!

Dear All,

 

I have an issue with the USERELATIONSHIP dax function, I have a blank result when I use it on my measures :

First of all this is my schema :

 

case.JPG

 

Then this is my measures :


AmountTotal_1 = CALCULATE(SUM ( Table1[amt] );DATESINPERIOD ( Date[Date]; MAX ( Date[Date] ); 10; YEAR );
USERELATIONSHIP ( Table1[ID]; Table2[ID] )
)

AmountTotal_2 = CALCULATE(SUM ( Table1[amt] );DATESINPERIOD ( Date[Date]; MAX ( Date[Date] ); 10; YEAR )
)

 

AmountTotal_3 = CALCULATE(SUM ( Table2[amount] );DATESINPERIOD ( Date[Date]; MAX ( Date[Date] ); 10; YEAR );
USERELATIONSHIP ( Table1[ID]; Table2[ID] )

 

This is the result :

 

case 1.JPG

 what looks strange is when I am using the same Measure with Table 2, it's working (AmountTotal_3)

 

Is there any problem with the granularity?

Is there any Function to add to avoid this?

Any Help please?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

When you activate the relationship between the two tables, the model becomes AMBIGUOUS. Please do not do this unless you want to have a hard time troubleshooting and create random numbers nobody will ever understand.

Please stick to this very simple rule of dimensional modeling:

Fact tables can only be joined through dimensions, never directly. The should also have all their columns hidden and measurements should be exposed only via explicit measures.

Try to violate this rule and you'll regret it rather sooner than later.

Best
D

View solution in original post

1 REPLY 1
Anonymous
Not applicable

When you activate the relationship between the two tables, the model becomes AMBIGUOUS. Please do not do this unless you want to have a hard time troubleshooting and create random numbers nobody will ever understand.

Please stick to this very simple rule of dimensional modeling:

Fact tables can only be joined through dimensions, never directly. The should also have all their columns hidden and measurements should be exposed only via explicit measures.

Try to violate this rule and you'll regret it rather sooner than later.

Best
D

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.

Top Solution Authors