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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.