Forum Discussion
Relationships Not Working After Embedding
- 1 year ago
Solved the issue by using Power Query to bring the information I needed from the location table to the contact table and then deactivating (not deleting) the relationships between the two. Had to do some DAX adjustments to account for the change, but it's working fine now.
Hi, thanks for the response! What I don't understand is how the report works on the Service and Desktop versions, but doesn't on the Embedded version, how the filtering works just fine on those two versions, but doesn't on the other, could it possibly be a different problem than this? Because if it actually was a relationship problem, I would be getting this error on all 3 platforms, no?
Hi matheuses,
You're right, the fact that the report works correctly in Service and Desktop versions but not in the Embedded version suggests that the issue might be related to the specific environment of the Embedded deployment.
Your observation that the problem arises when using RLS strongly points towards it being the root cause. Here's why:
- RLS dynamically filters data based on the current user's context. In your case, using userprincipalname() likely limits the data available to the user. The way RLS is applied and the user context is determined can differ between the Service, Desktop, and Embedded environments.
- The RLS rules, especially with the userprincipalname() function, might be interacting with the existing relationships in your model in a way that only causes issues in the Embedded environment.
Troubleshooting Steps:
- Start with a very basic RLS rule to isolate the issue. For example, try filtering data based on a static value instead of userprincipalname(). Gradually increase the complexity of the RLS rule to pinpoint the exact condition that triggers the error.
- Carefully analyse how your RLS rules interact with the relationships between tables in your model. Look for any potential conflicts or inconsistencies. Consider using the "Relationships" view in Power BI Desktop to visualize the relationships and how they are affected by RLS.
- Test the report in the Embedded environment with different users to see if the issue is specific to certain users or roles. Ensure that data refreshes are happening correctly in the Embedded environment. Incorrect data refreshes can lead to unexpected behaviour and errors.
If the issue persists, consider reaching out to Microsoft Support for further assistance. Below link is to create Microsoft support ticket:
https://learn.microsoft.com/en-us/power-bi/support/create-support-ticket
If this helps then please Accept it as a solution and dropping a "Kudos" so other members can find it more easily.
Thanks.
- v-ssriganesh1 year agoCommunity Support
Hi matheuses,
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.
Thank you.