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
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
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.

Top Solution Authors