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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Moniek
Resolver I
Resolver I

Extra column with data which contains in a other column

Hi 

I have got a table (see screenshot) and I have column Nr and Description and I want to generate the column Result. Is that possible? The results are different based on the positions.

Moniek_0-1705044445675.png

 

1 ACCEPTED SOLUTION
collinsg
Super User
Super User

Good day Moniek,

If the rule is "extract 'P's and digits", this code will extract "Result" from "Description".

= Table.AddColumn(#"Previous Step", "Result", each Text.Select([Description], {"P","0".."9"}), type text)

However, the rule may be stronger than this and may, for example, require digits to be included only if they follow Ps. The finite list of examples aren't enough to deduce it. Nevertheless I hope this helps a bit.

View solution in original post

1 REPLY 1
collinsg
Super User
Super User

Good day Moniek,

If the rule is "extract 'P's and digits", this code will extract "Result" from "Description".

= Table.AddColumn(#"Previous Step", "Result", each Text.Select([Description], {"P","0".."9"}), type text)

However, the rule may be stronger than this and may, for example, require digits to be included only if they follow Ps. The finite list of examples aren't enough to deduce it. Nevertheless I hope this helps a bit.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors
Top Kudoed Authors