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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Prefix for Capital Letters only

Hi,

 

Couldn't find anything to suggest a solution to my conundrum!

I have 2 tables containing website keywords and phrases, some being duplicates with the only difference being capitalisations on the first word.

When I'm trying to build my relationships in PBI, as it's not case sensitive, I keep only getting the option for many-many relations when the desired outcome is to have a 1-1 relationship.

 

Is there any way to add a prefix to the first word if the first letter is capitalised?

 

Thanks in advance! 🙂

1 ACCEPTED SOLUTION
jgeddes
Super User
Super User

= Table.TransformColumns(previousStep, {{"Column1", each if Text.PositionOfAny(_, {"A".."Z"}) = 0 then "prefix-"&_ else _, type text}})

jgeddes_0-1742915551953.png

 

jgeddes_1-1742915577419.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

3 REPLIES 3
jgeddes
Super User
Super User

= Table.TransformColumns(previousStep, {{"Column1", each if Text.PositionOfAny(_, {"A".."Z"}) = 0 then "prefix-"&_ else _, type text}})

jgeddes_0-1742915551953.png

 

jgeddes_1-1742915577419.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Anonymous
Not applicable

Thanks for this, the additional solution you provided was really useful but your original post gave me the desired outcome I was after!

Text.Proper() may be a better solution for you.

= Table.TransformColumns(previousStep, {{"Column1", each Text.Proper(_), type text}})

jgeddes_2-1742915761271.png

 

jgeddes_3-1742915776007.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors