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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
suzsword
Frequent Visitor

USERELATIONSHIP help - measure not using the relationship

I have a problem with the context being lost when calculating measures. I've attached the relationship that is being used.

RelationshipRelationship

I have two measures (Today's Value and Yesterday's Value) created that include USERELATIONSHIP so that the inactive relationship is used.

 

 

Today's Value = CALCULATE(SUM('pds V_BOPD'[BOPD]),
FILTER('pds V_BOPD', 'pds V_BOPD'[full_date]=DATEVALUE("21-feb-2019")), USERELATIONSHIP( 'pds V_BOPD'[field] , DimFieldList[Fieldname])
)

I then created another measure that indicates whether there is an increase or decrease in values and shows a coloured circle depending on the value. 

 

Arrows = SWITCH(
    TRUE(),
    ISBLANK([Yesterday's Value]), BLANK() & "Missing Data",
    ISBLANK([Today's Value]), BLANK() & "Missing Data", 
    [Today's Value] = [Yesterday's Value], CONCATENATE(UNICHAR(9898) ," No Change"), 
    [Today's Value] > [Yesterday's Value], CONCATENATE(UNICHAR(128309), " Increase"), 
    [Today's Value] < [Yesterday's Value], CONCATENATE(UNICHAR(128308), " Decrease"), 
    BLANK() )

As soon as I add the Arrows measure, the results are basically showing a cartesian product, where each field is showing against each site.  What am I missing?

 

Correct Results - without Arrows MeasureCorrect Results - without Arrows Measure

 

 
 
 
 
 
 
 
 
 
Results when Arrows measure is used - every field is showing with every siteResults when Arrows measure is used - every field is showing with every site
1 ACCEPTED SOLUTION

@suzsword  if you remove the site code, it removes the cartesian, the issue is because you dont have a relationship on the table that has site code, therefore it returns everything





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




View solution in original post

4 REPLIES 4
vanessafvg
Super User
Super User

@suzsword  any chance you can share the file?  or provide some data?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




You should be able to get the file from Here

 

 

Changing the order of the USERELATIONSHIP function made no difference. 


Thanks

Susan

@suzsword  if you remove the site code, it removes the cartesian, the issue is because you dont have a relationship on the table that has site code, therefore it returns everything





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




@vanessafvg I have similar problem but i have got relationship defined but still receiving cartesian product output. 

Once i remove the measure with function - it works with direct column but not with the measure with function. 

Please advise. 

https://community.powerbi.com/t5/Desktop/Data-is-Off/m-p/710786#M343188

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors