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
Anonymous
Not applicable

Duplicate rows when expanding JSON list

Hi, 

 

I'm having some problems to expand a list from a JSON document in Power Query. 

Look this figure:

Capture.JPG

The columns dimensions and dimensionsMap have just one value. The column timestamps has 30 values, so, when I expand my table must has 30 rows. Perfect!

Capture2.JPG

The last column values also has 30 values. My expectation: my table should still have only 30 rows. But, instead, my table now has 900 rows. 

Capture3.JPG

So, I need this:

dimensionsdimensionsMaptimestampsvalues
a1c4
b2d5
c3e6

 

But I have this:

dimensiondimensionsMaptimestampsvalues
a1c4
a1c5
a1c6
b2d4
b2d5
b2d6
c3e4
c3e5
c3e6

 

Can you help me? 

1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

You can add a custom column with a formula like this to combine those lists into a table.  You can then expand that table.

= Table.FromColumns({[dimensions], [dimensionsGroup]})

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous,

In fact, this result works as expected as expand feature designs. (Raw table records will be multiple if you expand one field record)
In my opinion, I'd like to suggest you add an index field to your table and do unpivot column on the field which you wanted to expand. Then your field will be converted to 'attribute' and 'value' and you can expand them at the same time without duplicate these field values. 

After these steps, you will get the unpivoted and expand fields value that mapping with index field values. You can do some mapping and pivot operations to transfer them to raw table structures.
Regards,

Xiaoxin Sheng

mahoneypat
Microsoft Employee
Microsoft Employee

You can add a custom column with a formula like this to combine those lists into a table.  You can then expand that table.

= Table.FromColumns({[dimensions], [dimensionsGroup]})

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


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.

Top Solution Authors