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
abhishek_rana
Regular Visitor

Dynamic Row Level Security on Analysis Services being accessed through Power BI Desktop

I am applying Dynamic RLS on Analysis services. The idea is to access it through Power BI Desktop (Live Connection).

Based on the User Logged on, row level security has to be applied.

As a next step, will deploy it to Power BI services for consumers to use this data based on their data access.

 

Issue - Dynamic RLS does not work on Power BI Desktop

 

abhishek_rana_0-1620316257771.png

abhishek_rana_0-1620316927653.png

 

 

Power BI Report made through live connection on Analysis services

 

abhishek_rana_2-1620316466206.png

Issue - Would like to receive only one row where RXA.CH as I am the logged in user (RXA.CH)

 

LOGINCODE - is a database table

WindowsInitials - is a measure - (WindowsInitials:=Upper(Left(USERPRINCIPALNAME(),Search("@",USERPRINCIPALNAME())-1))

where Userprincipalname() is 

abhishek_rana_3-1620317161176.png

 

RLS applied on the Analysis Services data model - 

 

abhishek_rana_3-1620316720201.png

 

Please help.

 

Best Regards, Abi

2 REPLIES 2
v-yetao1-msft
Community Support
Community Support

Hi @abhishek_rana 

You said you want to receive only one row where RXA.CH as you are the logged in user (RXA.CH), so whats the result that you see in the desktop ?

Could you provide more data about your sample ?

Maybe you can refer to the link , it may provide you with some useful information .

Dynamic row-level security with Analysis services tabular model - Power BI | Microsoft Docs

 

Best Regards

Community Support Team _ Ailsa Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello @v-yetao1-msft , Thank you for your reply.

 

Below is the result which I see instead -

abhishek_rana_0-1620641697857.png

 

I would like to see the result only where login code is RXA.CH.

abhishek_rana_1-1620641892483.png

 

As of now, I see the login code of all the members of the Role which should not be the case, as you can see in my original email the DAX code in the Row filter: LoginCode=WindowsInitials.

 

I have already gone through the post suggested by you (and many others) - 

Dynamic row-level security with Analysis services tabular model - Power BI | Microsoft Docs

 

As suggested in this post, I modified the DAX code for Row Filter to refer to Lookup function but that too did not help.

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.