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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Tendo23
Frequent Visitor

Row Level Security based on one table with 2 criteria from 2 different columns

Hello everybody,

 

I need your help, I am struggling with RLS.

 

I have on table which contains 3 columns:

 

CountryProduct GroupEmail
GermanyProduct ABoss@Boss.com
GermanyProduct BBoss@Boss.com
GermanyProduct CBoss@Boss.com
GermanyProduct AWorker@Boss.com
GermanyProduct CWorker@Boss.com

 

The table shows my rls structure. User Boss should see all revenues for every product of every country (Germany is just an expample, there are many more countries). Worker just is allowed to see the revenues for product A & C. RLS Table is connect by country to the revenue table.

 

I tried : [Email] = userprincipalname() && [Product Group] =userprincipalname()

 

Unfortunately it didn´t work out.

 

Does anybody has an idea how to solve my issue?

 

I am thankfull for every help I can get!

 

Tendo23

6 REPLIES 6
vk_pbi
Resolver II
Resolver II

Hi @Tendo23 

I think, you can add one more column to represent worker like (0,1), anyway Boss will have access to entire dataset.
Based on that, you can write your dax filter

I dont think so, it will work "[Product Group] =userprincipalname()" , 

Please provide some data to test it

 

Thanks

Hi @vk_pbi 

thanks for quick reply.

 

My expample file: TestDataFile 

 

What it should look like in the end:

 

UserCountryRevenues
Boss@Boss.comFrance                                  3.615,00
Boss@Boss.comGermany                               59.508,61
Boss@Boss.comTurkey                                  8.865,00
Boss@Boss.com (Total)                                71.988,61
Worker@Boss.comGermany                               39.925,09

 

 

Thanks for your support!

Tendo23

Hi @Tendo23 

A bit confused, please clarify

In Userstructure table, you have assigned product group as "Product A", "Product B" like wise whereas in Revenue table, you have product group as "A","B" like wise

Is this correct ?

Hi @vk_pbi ,

 

the table userstructure shows who is allowed to see the revenues in countries and revenues of product group.

 

User Boss@Boss.com can see everything.

User Worker@boss.com just can see the revenues for germany and only for the products A & C

 

Hope my explaniation helps. 🙂

 

Just to work around.. I have created one more bridge table to hold product groups, then created a role for Worker, anyway boss will have access on entire dataset. Pleaes test below approach and let me know

 

Create role->filter on User Structure table [Email]="USERPRINCIPALNAME()"

Create filter on help_products ->[Product Group] IN
SELECTCOLUMNS(
FILTER(
Userstructure,
Userstructure[Email] = USERPRINCIPALNAME()
),
"@Product Group",[Product Group]
)

vk_pbi_0-1685091301622.png

 

Hi @vk_pbi ,

 

thanks for your work. Unfortunately it doesn´t work.

 

I have recreated your model, but it doesnt work. 😞

 

 

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.

Top Solution Authors