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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Shortening a string in a column

Hello, so I have a column that has this super long string of text, and I was wondering if I could shorten it to say the first 15 characters or so somehow? I have tried using the LEFT function to write a measure but I can't use the column in that, only other measures. And there is no left function available when I try adding a column. Thank you

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , in a column

new column = left([col1],15)

 

In power query you can use text.start

https://docs.microsoft.com/en-us/powerquery-m/text-start

 

Text.Start([Col1])

 

 

in measure

New measure = left(Max(Table[Col1]),15)

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , in a column

new column = left([col1],15)

 

In power query you can use text.start

https://docs.microsoft.com/en-us/powerquery-m/text-start

 

Text.Start([Col1])

 

 

in measure

New measure = left(Max(Table[Col1]),15)

Anonymous
Not applicable

Thank you! didnt know about text.start

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors