Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
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.
Solved! Go to Solution.
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:
Then I click view as role and set other user as: xxx@xxx.com,you will see:
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 :
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.
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:
Then I click view as role and set other user as: xxx@xxx.com,you will see:
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 :
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.
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?
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.
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 23 | |
| 23 | |
| 20 | |
| 18 | |
| 14 |
| User | Count |
|---|---|
| 58 | |
| 51 | |
| 41 | |
| 30 | |
| 24 |