Search code examples
jsonpowerbipowerquerypowerbi-desktoppowerbi-datasource

How to change Rows and Columns in Power BI Desktop?


Screenshot of my Power Query Editor

Here is a screenshot of my data in the Power Query Editor. I am new to this program so please bear with me.

I added a bunch of json files from Azure Blob Storage as a data source and then I pressed "combine files". This is the result. My goal is to create a line chart that shows power over time. As you can see, I the leftmost column shows the name of the file, while the middle column shows the name of the variables saved in the file and the rightmost one has the values.

I want to have the "date" values on the X-axis and the "power_mw" values on the Y-axis of my line chart. I assume for that I have to create a column with the date values and another column with the power values, but this is what I get when I press "combine files" and I don't know how to edit it. Can anyone offer some help?


Solution

  • Try pivoting the Name column using the Value column unaggregated.

    Pivot Column Dialog

    You can find the pivoting commands under the Transform tab in the query editor.

    After pivoting, you should have this:

    Result