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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Employee
Employee

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
Employee
Employee

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors