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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
cruncher
Helper II
Helper II

How to Replicate ccomplicated Dynamic Row Level Security from Tableau to Power BI

We are currently using Tableau and exploring things to switch to Power BI. The major problem we are facing to replicate the row level security model from Tableau to Power BI.

 

We have a sales transaction table in format below.

 

RegionVerticalBusiness UnitQuarterSales
EastVert_1BU1Q1 243529
EastVert_1BU2Q1 243702
EastVert_1BU3Q1 243182
EastVert_2BU1Q1 244934
EastVert_3BU2Q1 241257
WestVert_1BU1Q1 24545
WestVert_1BU2Q1 243602
WestVert_1BU3Q1 242233
WestVert_2BU1Q1 243485
WestVert_3BU2Q1 241995
EastVert_1BU1Q2 247392
EastVert_1BU2Q2 248531
EastVert_1BU3Q2 243379
EastVert_2BU1Q2 241462
EastVert_3BU2Q2 245004
WestVert_1BU1Q2 242872
WestVert_1BU2Q2 24255
WestVert_1BU3Q2 245231
WestVert_2BU1Q2 249632
WestVert_3BU2Q2 247786

 

We have User Entitlement table in below format.

 

RegionVerticalBusiness UnitUSERS LIST 1USERS LIST 2USERS LIST 26
EastVert_1BU1anna|arvy|antonbicar|brandyzeptr
EastVert_1BU2anna|arvy|antonbrandyzeptr
EastVert_1BU3anna|arvy|antonbrandyzeptr
EastVert_2BU1arvy|antonbicar|brandyzeptr
EastVert_3BU2arvy|antonbrandyzeptr
WestVert_1BU1anna|antonbicar|brandyzene
WestVert_1BU2anna|antonbrew|brandyzene
WestVert_1BU3anna|antonbrandyzene
WestVert_2BU1antonbicar|brew|brandyzene
WestVert_3BU2antonbrew|brandyzene

 

Row level security is  based on Region, Vertical and Businees Unit.

For example:

a. anton and brandy can see all region, Verticals and BU

b. zeptr and Zene can see all verticals and Business Units of their respective Region.

c. bicar can see only BU1 from both the Regions

d. anna can access all BU and regions but only with Vertical 1

 

THere are 26 User List columns and usernames are available in one of the 26 columns based on first alphabet character. In tableau we are joining this entitlement table with transactions table and filtering the data based on user logged in and his first alphabet character so that his userid can be searched in one of the 26 user list columns.

 

There are 10000 users in our org and entitlement table contains 10 million unique values of combination of Region, Verticals and Business Units. If we convert the entitlement table from concatenated values to individuals rows so that each user has their respective row for each Region , Vertical and BU then data will explode to Hundred of Millions or even billions rows.

 

How to approach this Power BI so that there won't be any impact on performance and security will be dynamic ?

 

Many thanks in advance for reading all the way .

4 REPLIES 4
Anonymous
Not applicable

Thanks for the reply from _AAndrade , please allow me to provide another insight: 
Hi  @cruncher ,

 

Here are the steps you can follow:

1. Create calculated columns in both tables to combine [Region], [Vertical], [Business Unit].

Table1_Con =
[Region]&"-"&[Vertical]&"-"&[Business Unit]
Table2_Con =
[Region]&"-"&[Vertical]&"-"&[Business Unit]

vyangliumsft_0-1730270674178.png

2. Modeling – Manage Roles – Filter data -- Place the following formula .

When applying to multiple users, you can replace " bicar " with USERPRINCIPALNAME().

var _name="bicar"
var _user1=
SELECTCOLUMNS(
    FILTER(ALL('Table2'),
    CONTAINSSTRING('Table2'[USERS LIST 1],_name)=TRUE()),"user1",[Table2_Con])
var _user2=
SELECTCOLUMNS(
    FILTER(ALL('Table2'),
    CONTAINSSTRING('Table2'[USERS LIST 2],_name)=TRUE()),"user2",[Table2_Con])
var _user26=
SELECTCOLUMNS(
    FILTER(ALL('Table2'),
    CONTAINSSTRING('Table2'[USERS LIST 26],_name)=TRUE()),"user3",[Table2_Con])
RETURN
IF(
    'Table1'[Table1_Con] in _user1 ||
    'Table1'[Table1_Con] in _user2 ||
    'Table1'[Table1_Con] in _user26,
    TRUE(),FALSE())

vyangliumsft_1-1730270674184.png3. Result:

vyangliumsft_2-1730270758694.png

 

Best Regards,

Liu Yang

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

Thank you @Anonymous for detailed explanation. Will go through it and let you know how it performs with real data with 100 Millions row in transactions table.

QQ:

1. Do I have to create one to many relationship from users to transaction table  between these two tables on basis on newly created concatenated columns.

2. Right now you created 3 variables based on 3 users list columns. Do i have to created 26 variables for all 26 user list columns. Can it be done it in optimized way by looking at the ascii value of first character of logged in user so that we already know in which column out of 26 we have to search the userprincipal name ?

_AAndrade
Super User
Super User

Hi @cruncher,

I think you could find a solution for your issue in on of this links:
https://radacad.com/dynamic-row-level-security-in-power-bi-with-organizational-hierarchy-and-multipl...

 

https://radacad.com/dynamic-row-level-security-in-power-bi-with-organizational-hierarchy-and-multipl...

 

Reza has a lot of a good blog post and videos talking about a lot of type of RLS. I think this two links could be match your needs.





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




Thank you @_AAndrade . Give me some time. I will go through these links and let you know if that helps

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.