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
hawkeyes12
Frequent Visitor

How do I move data to two rows into one OR just move a certain value out of a column in Power Query?

Hello,

 

I have a large table (22 columns and +250 rows of data). I have the data *almost* formatted how I want it, except each unique value has two rows, which I need combined into one.

 

Unfortunately, I can't filter on any column to reduce the rows into one, because there is a column ("Entity") that contains data I need, but is in the opposite row of all of the values I need to keep. Here is an example of the data that I have in my table (note that all columns are not shown and that there are no numbers that I need to sum, add, etc.)

 

Example Data.PNG

 

Can you please advise?

 

3 REPLIES 3
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @hawkeyes12 ,

Have you solved the problem?

If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

If you still need help, please feel free to ask.

Best Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
MarkLaf
Solution Sage
Solution Sage

It looks like you can get what you want with following procedure:

  1. 'Fill Up' on one of the unique identifier columns
  2. split into two tables with filter (e.g. [Reference Key] = "Entity"   |   [Reference Key] <> "Entity")
  3. Join two table on the unique identifier column you filled up
  4. Expand the join column to get the additional info on one row per identifier

Note this only works if the order by the index is as you showed it, where the two lines are always together, and the row without the identifier is always above the row with the identifier.

v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @hawkeyes12 ,

For your requirement, please have a good look at this video which introduces how to Concatenate, Merge or Combine multiple rows into one value with Power Query.

If you still need help, please share your data sample as table format and your desired output so that I could have a test on it.

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
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.

Top Solution Authors