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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Karine_Zanfolin
New Member

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 @Karine_Zanfolin,

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

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.