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! Request now

Reply
mohittimpus
Helper V
Helper V

RLS dynamic problem

When I use the Hard code Id number then reprot is filtter.

 

But When I try to used "Username()" Function it give error message on all report.

 

Can any one please help.

 Screenshot_1.pngScreenshot_2.pngScreenshot_3.pngScreenshot_4.pngScreenshot_5.pngScreenshot_6.pngScreenshot_7.pngScreenshot_8.png

1 ACCEPTED SOLUTION
v-kelly-msft
Community Support
Community Support

Hi  @mohittimpus ,

 

I see  there're 2 filters in your RLS setting,does the 2 filters make conflict?From the error report,seems the 2 filters contain differenct data type,better check the filters and avoid conflicts.

I will show you sample:

Annotation 2020-02-27 150300.png

Then I click view as role and set other user as: xxx@xxx.com,you will see:

 

Annotation 2020-02-27 150402.png

Here for "other user",you can only fill in with username or userprincipalname,it's used to check who can see the contents.

But if I add another filter,which makes conflicts with the filter I set before, you will see :

Annotation 2020-02-27 150809.png

Annotation 2020-02-27 150924.png

 

As in the column of "ID",it's an int type,but I create an expression to make it equals a text type,which makes conflicts.What's more,even if there's no conflicts in expression,when you make 2 filters ,one makes ID equals 9,and another equals 8,it also will make conflicts, which makes no value appear.

 

Here is the reference about dynamic RLS.

 

Best Regards,
Kelly
 
Did I answer your question? Mark my post as a solution!

View solution in original post

4 REPLIES 4
v-kelly-msft
Community Support
Community Support

Hi  @mohittimpus ,

 

I see  there're 2 filters in your RLS setting,does the 2 filters make conflict?From the error report,seems the 2 filters contain differenct data type,better check the filters and avoid conflicts.

I will show you sample:

Annotation 2020-02-27 150300.png

Then I click view as role and set other user as: xxx@xxx.com,you will see:

 

Annotation 2020-02-27 150402.png

Here for "other user",you can only fill in with username or userprincipalname,it's used to check who can see the contents.

But if I add another filter,which makes conflicts with the filter I set before, you will see :

Annotation 2020-02-27 150809.png

Annotation 2020-02-27 150924.png

 

As in the column of "ID",it's an int type,but I create an expression to make it equals a text type,which makes conflicts.What's more,even if there's no conflicts in expression,when you make 2 filters ,one makes ID equals 9,and another equals 8,it also will make conflicts, which makes no value appear.

 

Here is the reference about dynamic RLS.

 

Best Regards,
Kelly
 
Did I answer your question? Mark my post as a solution!
Anonymous
Not applicable

When you use the Username() it returns your desktop Username
and for UserprincipleName() it returns users emailId

I can see the field you are appling the RLS is number and this functions do not match with it.
TRY Mapping the field with UserEmailId using UserPrincipleName()

Any dynamic funcion where I can used Number like username?

 

 

Anonymous
Not applicable

I am not sure about Function BUT
the workaround is store the UserEmail and UserID In One table and filter the report (Report level filter) by current Users EmailId
it will refer to your Number and report will get filter based on the Number you want.

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