cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Shivaranjini
Frequent Visitor

How to add the headers to the json content

Hello All,

I'm stuck trying to add the headers to the json content.

My source is the list of the json data i.e. the table is this format

Column
Records1
Records2
Records3
Records4
Records5
Records6

And each records of the table have json data like

object1:value1
object2:value2
object3:value3
object4:value4
object5:value5
object6:value6

 

I want to give the header to all of the records content like this:

ColumnNameValue
object1:value1
object2:value2
object3:value3
object4:value4
object5:value5
object6:value6

How do I achieve this?

2 REPLIES 2
mahoneypat
Microsoft
Microsoft

The simplest thing to try would be to expand it all out so that each Object is a column, and then unpivot your data to get an Attribute and Value column like you are looking for. If you provide some sample JSON, a more specific solution can be suggested.

 

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


artemus
Microsoft
Microsoft

The easiest way is to do a splitcolumns operation in the transform tab. Just split on the colon (:) and rename the resulting columns.

Helpful resources

Announcements
September Update

Check it Out!

Click here to learn more about the September 2022 updates!

Power BI Dev Camp Session 26

Check it Out!

Mark your calendars and join us on Thursday, September 29 at 11a PDT for a great session with Ted Pattison!

Top Kudoed Authors