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

Show all table data/ corresponding data depending on the condition

Hi 
I am trying to implement rls on a power bi report 

 

i have a table which has 1000's of id's, i want to show the entire table if the custom data is passed as string 'All' and show only data corresponding to that id if the custom data is passed as 'id'

looking for an equivalent of 

 

[id] = if('Table'[Custom Data] ="All", {missing code to show data for all id's}, 'Table'[id])

 

this table already has a relationship with another user table which filters data to show relevant information for logged in user only

also open to trying out any other approach instead of adding this filter to the role

2 REPLIES 2
Daniel_PowerBI
Advocate I
Advocate I

Hi,

 

You can try dynamic RLS with USERPRINCIPALNAME() which is based on the email connected to Power BI Services

Here is a nice video explaining how to do it:

https://www.youtube.com/watch?v=axTyP7I2Bso

Hey Daniel,

Thank you for your reply, i've been able to setup RLS using principal name, the requirement here is that the report will be placed in 2 different locations 

One would be a general dashboard where users would be able to see project id's assigned to them 

this view would contain certain WBS data along with the project id's 

Second would be inside the project id's where it should only show data relevant to that project id.

 

So depending on where the report is being called from in the UI we want to showcase all data or some data 

when i'm implementing RLS 

i'm able to obtain filtered data using the highlighted part
it is that when the same report is pulled from where it show all data the italic part i'm facing issues with the syntax or logic implementation 
 
[id] = if('Table'[Custom Data] ="All", {missing code to show data for all id's}, 'Table'[id])

i've tried to use [id] = [id] standalone and that works but not in IF statement 

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