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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
dandelion
New Member

Parse a table from Jira in Power Query

Hi,

I have a table with this format:

PoolNumber
Fruits5
Veggies30
Dairy-
grain2
eggs-

 

In Power query I've got the format below:

||Pool||Number|| |Fruits|5| |Veggies|30| |Dairy|-| |grain|2| |eggs|-|

 

I would like to have new columns with names Fruits, Veggies, Dairy, grain, eggs and add the values mentioned in table to these columns. 

How can I parse it efficiently?

2 ACCEPTED SOLUTIONS
shafiz_p
Super User
Super User

Hi @dandelion  To acheive your desired table, first split the column by delimeter "|". Then remove all the unnecessary column which is blank. After that,  merge all the pool seperated by "|" and merget all the number seperated by "|" (Keep orginal serial). Then tranpose, split and transpose again. Use first row as header and you are done. See images:

You have format like that:

shafiz_p_0-1739617090485.png

 

After spliting by "|", You will get blank columns:

shafiz_p_1-1739617156746.png

After removing blank column:

shafiz_p_2-1739617224189.png

After merged all the pools and numbers, seperated by "|", you will get only 2 columns:

shafiz_p_4-1739617302233.png

After Transpose, you will get:

shafiz_p_5-1739617336291.png

 

After split by "|", and you will get:

shafiz_p_6-1739617373273.png

Now transpose back, and you will get:

shafiz_p_7-1739617411372.png

After promoting first row as header, you will get your desired result:

shafiz_p_8-1739617445943.png

 

Check the steps, in the attached excel file.

 

Hope this helps!!

If this solved your problem, please accept it as a solution and a kudos!!

 

Best Regards,
Shahariar Hafiz

 

View solution in original post

dufoq3
Super User
Super User

Hi @dandelion, another solution:

Output

dufoq3_0-1739637888645.png

let
    Source = #table(null, {{"|Pool||Number|| |Fruits|5| |Veggies|30| |Dairy|-| |grain|2| |eggs|-|"}}),
    Transformed = Table.Combine(Table.TransformColumns(Source,{{"Column1", each Table.PromoteHeaders(Table.FromRows(List.Split(List.ReplaceMatchingItems(List.Select(Text.Split(_, "|"), (x)=> Text.Trim(x) <> ""), {{"-", null}}), 2))), type text}})[Column1])
in
    Transformed

Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

View solution in original post

3 REPLIES 3
v-pnaroju-msft
Community Support
Community Support

Thank you @shafiz_p and @dufoq3 for your response.

Hi @dandelion,

We would like to inquire if the solution offered by @shafiz_p and @dufoq3has resolved your issue. If you have discovered an alternative approach, we encourage you to share it with the community to assist others facing similar challenges.

Should you find the response helpful, please mark it as the accepted solution and add kudos. This recognition benefits other members seeking solutions to related queries.

 

Thank you.

dufoq3
Super User
Super User

Hi @dandelion, another solution:

Output

dufoq3_0-1739637888645.png

let
    Source = #table(null, {{"|Pool||Number|| |Fruits|5| |Veggies|30| |Dairy|-| |grain|2| |eggs|-|"}}),
    Transformed = Table.Combine(Table.TransformColumns(Source,{{"Column1", each Table.PromoteHeaders(Table.FromRows(List.Split(List.ReplaceMatchingItems(List.Select(Text.Split(_, "|"), (x)=> Text.Trim(x) <> ""), {{"-", null}}), 2))), type text}})[Column1])
in
    Transformed

Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

shafiz_p
Super User
Super User

Hi @dandelion  To acheive your desired table, first split the column by delimeter "|". Then remove all the unnecessary column which is blank. After that,  merge all the pool seperated by "|" and merget all the number seperated by "|" (Keep orginal serial). Then tranpose, split and transpose again. Use first row as header and you are done. See images:

You have format like that:

shafiz_p_0-1739617090485.png

 

After spliting by "|", You will get blank columns:

shafiz_p_1-1739617156746.png

After removing blank column:

shafiz_p_2-1739617224189.png

After merged all the pools and numbers, seperated by "|", you will get only 2 columns:

shafiz_p_4-1739617302233.png

After Transpose, you will get:

shafiz_p_5-1739617336291.png

 

After split by "|", and you will get:

shafiz_p_6-1739617373273.png

Now transpose back, and you will get:

shafiz_p_7-1739617411372.png

After promoting first row as header, you will get your desired result:

shafiz_p_8-1739617445943.png

 

Check the steps, in the attached excel file.

 

Hope this helps!!

If this solved your problem, please accept it as a solution and a kudos!!

 

Best Regards,
Shahariar Hafiz

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors
Top Kudoed Authors