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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

RLS string transformation

Hi All,

 

I am using Embeded power BI and in that RLS we are using. In the username() i am getting a string and i need to filter the data. In the RLS i get the list of values in the form of a string. I am getting additonal characters which i don't want in order to filter the data. Could you please help which DAX function will work.

I am getting list of values as a string: "'ABC','TDEF','HIJ'"

and i should have like this "ABC","TDEF","HIJ"

Means i need to exclude the first and last character of the double quotes and replace single quotes with Double quotes. The list of values will increase. it should work dynamically 

2 ACCEPTED SOLUTIONS
tamerj1
Super User
Super User

Hi @Anonymous 

please try

=
SUBSTITUTE ( SUBSTITUTE ( USERNAME (), """", "" ), "'", """" )

View solution in original post

Anonymous
Not applicable

Thank you very much. All my single quotes are coverted into double quotes

View solution in original post

2 REPLIES 2
tamerj1
Super User
Super User

Hi @Anonymous 

please try

=
SUBSTITUTE ( SUBSTITUTE ( USERNAME (), """", "" ), "'", """" )

Anonymous
Not applicable

Thank you very much. All my single quotes are coverted into double quotes

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.