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
Mephys
Frequent Visitor

Relationship error in Power BI service appears if user has just Viewer status in Workspace

Hello All, 

I'm quite struggling with a really strange behaviour on a published report.

Here is the context : 
- We have 2 tables with 2 relationships :
1 active, 1 inactive

Mephys_0-1650639247836.png



- I got measures in a Matrix using each, depending of the business rule.
- It works perfectly on Desktop
- It also works perfectly once published, with a contributor, member or administrator role in the workspace.

BUT, whenever the role is viewer i got this error message (sorry in french)  :

Mephys_1-1650639344296.png

If i translate, it would be something like : 
"...., But table "Ventes - Détails MDV" has two paths to table  "Ventes - Détails Commande" :  "Ventes - Détails MDV" -> "Ventes - Détails Commande"   and  "Ventes - Détails MDV" -> "Ventes - Détails Commande"

 
Honestly, i'm totally confused there. 
I reviewed difference between workspace roles, and i see not a single feature that could explain this. 

If you have an idea, please don't hesitate !

1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @Mephys ,

By my reserch, the problem usually caused by the RLS, which only takes effect when the user is in the viewer role.

 

You have two relationship between two tables, and I guess you use USERELATIONSHIP function to active the inactive relationship in your sample, which will cause an error when there is RLS. RLS is creating a direct path using the table relationships. So, when USERELATIONSHIP() is added, that can sometimes cause a circular reference. The limitation is listed in the official document: USERELATIONSHIP function (DAX) - DAX | Microsoft Docs

USERELATIONSHIP cannot be used when row level security is defined for the table in which the measure is included.

The general fix to that is that you have to adjust your filter flow (single or both) or otherwise change your model so that you do not have two paths between tables. 

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yanjiang-msft
Community Support
Community Support

Hi @Mephys ,

By my reserch, the problem usually caused by the RLS, which only takes effect when the user is in the viewer role.

 

You have two relationship between two tables, and I guess you use USERELATIONSHIP function to active the inactive relationship in your sample, which will cause an error when there is RLS. RLS is creating a direct path using the table relationships. So, when USERELATIONSHIP() is added, that can sometimes cause a circular reference. The limitation is listed in the official document: USERELATIONSHIP function (DAX) - DAX | Microsoft Docs

USERELATIONSHIP cannot be used when row level security is defined for the table in which the measure is included.

The general fix to that is that you have to adjust your filter flow (single or both) or otherwise change your model so that you do not have two paths between tables. 

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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
Top Kudoed Authors