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
Anonymous
Not applicable

Table filter dax Expression error (RLS)

Hi Experts

 

I am trying to add the following to the manage roles in (RLS) section based on table Permsissions (filter applied to Email Address)

 

[Email Address] = USERPRINCOPLENAME()

|| [LEVEL 03] = USERPRINCOPLENAME()

|| [CC CODE] = USERPRINCOPLENAME()

 

Level 03 and Email Address are text column, CC Code is a numerical value...

the error message i am getting is Consider using VALUES or FORMAT funtion to convert one of the values .... question is how do you apply Values or format to the last line || [CC CODE] = USERPRINCOPLENAME()

 

 

 

 

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@Anonymous the fundamental issue is the you cannot compare number field with text column, so cc code is number and you can't compare it with USERPRINCIPALNAME() which is text 

 

As @amitchandak  asked, it is not clear why this is required, share a sample data with the use case where CC Code will be used for RLS. Your sample data doesn't show all the details, like Level 02 column, where is this column?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

5 REPLIES 5
parry2k
Super User
Super User

@Anonymous the fundamental issue is the you cannot compare number field with text column, so cc code is number and you can't compare it with USERPRINCIPALNAME() which is text 

 

As @amitchandak  asked, it is not clear why this is required, share a sample data with the use case where CC Code will be used for RLS. Your sample data doesn't show all the details, like Level 02 column, where is this column?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

amitchandak
Super User
Super User

@Anonymous , what is the objective here to do this 

[CC CODE] = USERPRINCOPLENAME()

you can compare email with email not with code

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

My objective to is apply RLS to email based on Email Filter (permission table) - Which links to bidge table via department which link to FACT table via department but ONLY show CC Code that apply to John....in Finance .....we do not have cc code for all department....Hence i was trying to create some sort of hierarchy


See image

Route111_0-1640869188092.png

 

Can you send a picture of your model or better a demo pbix file?



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Anonymous
Not applicable

Hi Bcbobbs - The relationship is Both Between Permission table and the Lookup table based in ID and one to many between Lookup table and FACT table...

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