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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
mcarper
Regular Visitor

Syntax for Row-Level Security

Has anyone gotten the newly available Row-Level Security (Preview) to work?

 

I'm using an imported SSAS Tabular on-premise dataset. When I connect to the tabular model in Desktop, it automatically names the columns "TableName.ColumnName", which I've kept.

 

So a role I'm testing on a user looks like this:

 

= [TableName.ColumnName] = 13

 

Where the column is an ID column. I'd eventually like to reference USERNAME and implement user security, but I'm just trying to get this to work. However, the above rule will cause a blank report for the user.

 

I'll add that the above syntax will create red squiggly syntax error lines in the DAX input screen. The only way to get ride of these syntax errors is to create a rule like this:

 

= [ColumnName] = 13

 

Which omits the TableName, even though the TableName is part of the column name. This also creates a blank report.

1 ACCEPTED SOLUTION

Sorry, yes, I justed checked and the actual input should be:

 

TableName[ColumnName] = "text"

 

Without the leading "=" sign, my bad.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

5 REPLIES 5
ashishrj
Power Participant
Power Participant

Hello All,

Please find the link of the webinar below which we have conducted on RLS in Power BI

Greg_Deckler
Community Champion
Community Champion

I have last night at our Power BI User Group meeting. The syntax I used was DAX:

 

= TableName[ColumnName] = "text"

 

I did not try it with a number, but I think it is because you are not referencing the table name in your query.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Weird, I'm trying both 'TableName'[ColumnName] and TableName[ColumName] and neither works.

orionlee
Microsoft Employee
Microsoft Employee

Hi @mcarper, does it work if you drop the '=' prefix.

 

For example, put this in the rule:

[ColumnName] = 13

Sorry, yes, I justed checked and the actual input should be:

 

TableName[ColumnName] = "text"

 

Without the leading "=" sign, my bad.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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