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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! 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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.