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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
AlvinLy
Helper II
Helper II

Append columns from multiple query duplicates

Hello Microsoft Community,

 

I have a scenario, that I haven't been able to find answers for as of yet. I am new to Power Query so this might be quite simple and I just don't understand the full potential of Power Query yet.

 

For my scenario, I grab data from an API. The data comes through as a giant array with many data fields in each section, the simplest ones are date, text, or number values, but some come as arrays or objects, which in this scenarios would be arrays of groups of arrays. The data comes as a JSON file and I use Power Query to organize the data. I am currently working on a small subset which would be the test data.

 

After I've sorted the data as best I can I come (expanded columns, converted tables, removed columns, etc.) to the issue of these arrays which in query would be lists of lists or lists of records. I can't figure out how to properly extract the information from the list. Specifically, I want to add x additional columns to my dataset. Where each column name is made up of a string field in each record in the list, and the value assigned to that column would be another string field in same record in the list. I was not sure how to do this so instead I duplicated my query and went into each list separately. See picture below.

 

AlvinLy_0-1699560598466.png

 

From each duplicated query, I can now sort out this column and value issue via filtering columns, transposing table, and promoting headers and such. For example, the Code Values duplicate tab, which was a list from the original query looks like this now

 

AlvinLy_1-1699560699450.png

Where the column titles (BT-Phase and BT-Project Number) were previously the same labelled values of each record in the list, and the outputs (FEED, TEST) were also another labelled values of each record in the list. 

 

My questions are:

  1. Is there a way to append this smaller code values table to the end (right side) of the project table?
  2. Is my approach correct or is there a much smarter way in doing this? I was hoping I could use a formula in the column name field when adding a custom column, but I had no luck on my attempts. (Note: my current scenario only deals with one data entity, in the future I will need to do the same to 1000 data entities, each of them with their own similar lists)

 

Any help would be appreciated, even if the answer is I'm going down the wrong path for this scenario.

 

 

1 REPLY 1
lbendlin
Super User
Super User

2. Avoid merges in Power Query whenever you can.  Instead, let the Power BI data model do the work for you.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.