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
sarafparam
New Member

Userrelationship and Role Level Security Issue

Hi All,

 

I have already read a couple of blogs on this issue and am still unable to resolve this issue completely

 

To give the overview of my problem. I have the following model:designmodel.JPG

DimName and DimSurname are the filters on my dashboard. I have 2 types of measures

1. Measures that userelationship with NameA->Name and SurnameA->Surname, and

2. Measures that userelationship with NameB->Name and SurnameB->Surname

 

In addition I have role level security applied to the DimName, DimSurname and Fact

 

If I use "Userelationship" I get error which is a known limitation of tabular model (Chriss Webb's blogpost: https://blog.crossjoin.co.uk/2013/05/10/userelationship-and-tabular-row-security/)

 

I tried to use Virtual Relationship using FILTER ALL and CONTAINS ( Marco's post https://www.daxpatterns.com/handling-different-granularities/  )

 

This works fine but it fails to override the active relationship: For the measure below for eg:

CALCULATE

(
           DISTINCTCOUNT('Fact'[ID]),
           'Fact'[ID]<> BLANK(),
            FILTER (
                        ALL ( 'Fact'[NameB] ),
                        CONTAINS (
                                         VALUES ( 'DimName'[Name] ),
                                         'DimName'[Name] ,
                                         'Fact'[NameB]
                                           )
                        )

The active Filter is based on NameA and the above measure is not able to override NameA filter (Even if I use ALL ( 'Fact'[NameA] inside Filter or outside )

 

Is there any way to override the Filter here or in general can you suggest the optimal/best approach to solve this issue? (For example having 2 different Fact Tables with simplified relationships to the 2 Dims)
)

 

 

1 REPLY 1
v-shex-msft
Community Support
Community Support

Hi @sarafparam,

 

In my opinion, I'd like to suggest you split fact table to different tables or try to merge similar columns to one.

Unpivot Data Using Excel Power Query


Power bi not support dynamic active relationship and apply them to RLS.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help 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