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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
therealomacoder
Helper II
Helper II

Switch Active Relationships When Using Measure - Recent change in behavior of USERELATIONSHIP?

Hi gurus- my visuals used to work just fine. At some point, they stopped displaying the intended information and the underlying engine is changing how the visuals are querying the data.

 

Scenario is below. 

[Docs Drawn] measure uses USERELATIONSHIP() function but it is not being acklowledged and instead is only using the default active relationships.

 

Signing Count (Relation: Signing Date) = CALCULATE(sum('File - Signing Info'[SigningCnt]),USERELATIONSHIP('File - Signing Info'[Signing Date],'Date Hierarchy'[CalendarDate]))+0
 
If I remove the filter from the File - Security table, the visual again works as intended.

Can you help explain and advise if this is a new undocumented feature of how USERELATIONSHIP does/does not work?

 

therealomacoder_1-1618767275271.png

 

 

6 REPLIES 6
therealomacoder
Helper II
Helper II

The problem IMO is the one single date table that is allowed in a model. It's very very hard to utilize one single date table against so many facts. So easy to resolve this by defining which relationship I want to use, but apparently PowerBI doesn't think the same?

GilbertQ
Super User
Super User

Hi @therealomacoder 

 

It would appear that your other relationships with the filter direction set to both are causing the issue?

 

I would suggest looking to see how to remove the cross filter direction being set to single.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Thanks for the suggestion! I honestly don't know much about that feature nor do I understand why this would be turned on vs turned off. I'll try turning off and testing the behaviors again! Stay tuned

Turning off cross filtering causes row level security to break and allows the user to see all records from [File - Signing Info] even though they do not have a relation to those in the [File - Security].

 

Any other suggestions?

Hi @therealomacoder 

 

l would first try this and if it works, the you might have to relook at how the RLS is being implemented?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

This is only 4 tables in the model of a hundred tables that all revolve around File Security for RLS. This use case seems super simple and was working at one point in time. Re-architecting the user security is going to be the last resort.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors