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

Extracting Information from one column to a new column

I am wondering if this is possible, or if it's just wishful thinking.

 

I have a column that contains paragraphs of information in each cell. They are descriptions of reports. But contained within each of these descriptions (and there are hundreds of them), are report numbers like: "JS 93498390" or "JS #93498390" or "JS#93498390" Every report ID has the letter JS in front, followed by a # or a space or no space and then 8 digits like the examples shown.

 

I want to extract them all into a new column. I can separate them and sort them from there. Is this possible? What would happen if there were multiple report numbers contained within each line item?

 

ex0dus2020_0-1664417047997.png

 

1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi @Anonymous ,

 

Here I suggest you to create a calculated column by below code.

Extracted Report =
VAR _Step1 =
    RIGHT (
        'Table'[Description],
        LEN ( 'Table'[Description] ) - FIND ( "JH", 'Table'[Description], 1, 0 ) + 1
    )
VAR _Step2 =
    LEFT ( _Step1, FIND ( ".", _Step1, 1, 0 ) - 1 )
RETURN
    _Step2

Result is as below.

RicoZhou_0-1664508995485.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-rzhou-msft
Community Support
Community Support

Hi @Anonymous ,

 

Here I suggest you to create a calculated column by below code.

Extracted Report =
VAR _Step1 =
    RIGHT (
        'Table'[Description],
        LEN ( 'Table'[Description] ) - FIND ( "JH", 'Table'[Description], 1, 0 ) + 1
    )
VAR _Step2 =
    LEFT ( _Step1, FIND ( ".", _Step1, 1, 0 ) - 1 )
RETURN
    _Step2

Result is as below.

RicoZhou_0-1664508995485.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.