1

After conversion of json output into table in Power BI. enter image description here

However, I'm unable to transform above format into below format in Power BI.

expected result

Any suggestion how I can solve this problem in Power BI.

Thanks for the help

1 Answer 1

0

You can try this code

let Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Added Index" = Table.AddIndexColumn(Source, "Index", 0, 1, Int64.Type),
#"Added Custom" = Table.AddColumn(#"Added Index", "Custom", each if [column.lable]="name" then [Index] else null),
#"Filled Down" = Table.FillDown(#"Added Custom",{"Custom"}),
#"Removed Columns" = Table.RemoveColumns(#"Filled Down",{"Index"}),
#"Pivoted Column" = Table.Pivot(#"Removed Columns", List.Distinct(#"Removed Columns"[column.lable]), "column.lable", "column.value"),
#"Removed Columns1" = Table.RemoveColumns(#"Pivoted Column",{"Custom"})
in  #"Removed Columns1"

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.