cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Community Support
Community Support

Re: Userrelationship and Role Level Security Issue

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors