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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Afiq_Danial
Helper II
Helper II

Power Query - Getting Shortform

Hi,

 

I have a table that looks like this right now:

Afiq_Danial_0-1669867834333.png

Some of the certificates name has short forms while others dont. I want to create a new column in power query which only take the texts in the bracket. For the certificate that does not has any shortform in the brackets, i want it to show the full name in the new column. I have to do it in power query (something that im still learning)
What i want my table to look like is this:

Afiq_Danial_2-1669868013479.png

This is the file: https://drive.google.com/drive/folders/1ojdvJSwOLTcF7c_e58bNLjeUo92aQO_O?usp=share_link

Thank you, Appreciate the help I'm getting.

 

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@Afiq_Danial 

you can try this

if Text.PositionOf([certificate],"(") <1 then [certificate] else Text.Middle([certificate], Text.PositionOf([certificate],"(") +1,Text.PositionOf([certificate],")") -Text.PositionOf([certificate],"(")-1 )

1.PNG





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

Proud to be a Super User!




View solution in original post

2 REPLIES 2
sandeephijam
Helper I
Helper I

Hi @Afiq_Danial 

 

Try the above formula by changing the "c" on certificate as "C" it works and give you the result that you are looking for.

 

Re-sharing the command again here with update :

= Table.AddColumn(#"Changed Type", "Custom", each if Text.PositionOf([Certificate],"(") <1 then [Certificate] else Text.Middle([Certificate], Text.PositionOf([Certificate],"(") +1,Text.PositionOf([Certificate],")") -Text.PositionOf([Certificate],"(")-1 ))

 

Capture45.JPG

 

 

ryan_mayu
Super User
Super User

@Afiq_Danial 

you can try this

if Text.PositionOf([certificate],"(") <1 then [certificate] else Text.Middle([certificate], Text.PositionOf([certificate],"(") +1,Text.PositionOf([certificate],")") -Text.PositionOf([certificate],"(")-1 )

1.PNG





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

Proud to be a Super User!




Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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