Extracting Data with Power Query

This part of the guidance will talk you through the steps to get the data through Power Query once you have hold of all the pieces for the query.

Power Query DAX Query Input

    Image of data source options in Power BI.



    Image of advanced editor button.



    Image of aggregated table.



Transforming Table in Power Query

When we channel the data into Power Query it doesn't look as expected. We will need to do some manipulation in Power Query to create the table with the fields and values we want.

The Field Names and Values will need to be extracted separately into two tables which we can then merge at the end.

The Field Names in this example are the Regions and Month.

Values refer to the actual numbers.

    Duplicate selection.



    Query data source labels.



Expanding Field Names Query

    Fields list highlighted.



    Convert table button.



    Ok button.



    Transpose button highlighted.



    Deselected items.



    Expand to new rows highlighted.



    Deselect labels.



    Expand to new rows highlighted.



    Column with text values.



    Final result with index column added.



Expanding Values Query

    Switch to Field Names data source.



    Cubes record highlighted.



    Record button highlighted.



    List button highlighted.



    To table button highlighted.



    Expand to new rows box.



    Final values table with index column.



Merging Query Tables

    Merge queries box highlighted.



    Merge options editor box with index columns greyed.



    Deselected options.



    Finished table with close and apply box highlighted.