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
lboldrino
Resolver I
Resolver I

How Extract TicketNumber from Text

i need only the ticketnumbers from any desciption, 

my steps:

duplicate the column:

  WorkDescription - Copy

= Table.TransformColumns(#"Reordered Columns", {{"WorkDescription - Copy", each Text.BeforeDelimiter(_, "—"), type text}})

= Table.TransformColumns(#"Extracted Text Before Delimiter", {{"WorkDescription - Copy", each Text.AfterDelimiter(_, "#"), type text}})

lboldrino_1-1607527725009.png

 

and now?

how can i extract only the ticketnumbers?

 

thanx for any idea! 

lg 

 

1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

Please see this video that covers just this scenario.

Power BI Tales From The Front - Extracting Numbers From Text - YouTube

 

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

3 REPLIES 3
mahoneypat
Microsoft Employee
Microsoft Employee

Please see this video that covers just this scenario.

Power BI Tales From The Front - Extracting Numbers From Text - YouTube

 

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Ashish_Mathur
Super User
Super User

Hi,

Share data in a format that can be pasted in an MS Excel file and clearly show the result you are expecting.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
PhilipTreacy
Super User
Super User

Hi @lboldrino 

Please see this PBIX file for 2 examples of doing this.  Please supply sample data in questions so we don't have to retype everything.  You can just copy/paste the data/text.

One question- in your data above, there are cells where there is more than 1 ticket number, do you only want to extract the first number?

In the first example in my file I've just created a list of ticket numbers from some sample data I typed in.

ticket-sample-data.png

giving this result

ticket-nums.png

Note that the numbers as displayed in scientific notation, you can change them to text if you need/want to, but leave them as number type if you need to do any numeric calculations.

nums-as-text.png

 

The 2nd example is more in line with yours, giving this result

desc-nums.png

Regards

Phil


If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors