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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Bhumika9
Regular Visitor

RlS and OLS

hello everyone ,

I am tring below and stuck in situation like :

var _Restriction =
CALCULATETABLE(
VALUES(COMPANYMAPPING[CLS 1 ]),
COMPANYMAPPING[Email]=USERPRINCIPALNAME()
)

var _Restriction1 =
CALCULATETABLE(
VALUES(Parameter[PF Fields]),
Parameter[PF Order]=4
)

var RLS_Restriction =
SWITCH(
TRUE(),
_Restriction = "G1",[PF] IN {_Restriction1},

)
Return
RLS_Restriction

Above is RLS role where i am restricting columns but We want to do it dynamic and for that you can see code in bold which I am tring to pass switch case .
"PF Fields" contains coulms that i want restict from parameter table .Like only "Values","Amount" columns wants to show
When hardcoded in switch case like _Restriction = "G1",[PF] IN {"VALUE","Amount"} its is working .
But i have stored in mapping table and now want to pass it in swich satetment so it should work dynamically.

Thanks 
Pooja Dhonde



2 REPLIES 2
audreygerred
Super User
Super User

Hi! To restrict columns/fields you need to use OLS instead of RLS. RLS restricts rows/records. For OLS you will need Tabular Editor 2: Object-level security (OLS) with Power BI - Power BI | Microsoft Learn





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Anonymous
Not applicable

Hi ,Thanks for reply , but OLS with Tabular editor would not used in my case .

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.