Forum Discussion
Zyg_D
Continued Contributor
6 years agoUSERELATIONSHIP does not work on one-to-one
The function USERELATIONSHIP nicely works when the top right relationship is one-to-many. But when I change it to one-to-one, the USERELATIONSHIP does not yield correct results. Why? It should not be...
MFelix
Super User
6 years agoHi Zyg_D ,
This is related with the way that the USERELATIONSHIP works, the function is used as a context transaction and the calculated columns force this to be a row context so the calculation will give inacturated values.
Check the blog post of SQL BI with a full detail on this, and that suggest in this case the use of LOOKUPVALUE or the use of CALCULATETABLE depending on expected results.
https://www.sqlbi.com/articles/userelationship-in-calculated-columns/