Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

reformat a table using Power QUERY

Hi- All ideas welcome: I have a table like so   Part Numbers Supplier Name Total Cost ABC1 SUP1 £X ABC2 SUP1 £X ABC2 SUP2 £X ABC3 SUP3 £X ... ... ... ......
  • AlexisOlson's avatar
    4 years ago

    If you pivot the Supplier Name column using Total Cost as the values, you'll get this:

  • BA_Pete's avatar
    4 years ago

    Hi Anonymous ,

     

    The direct answer is to select your [Supplier Name] column, then go to Transform tab > Pivot Column and select [Total Cost] as the values to get this output:

     

    However, the real question is WHY you want to do this in PQ?

    You're essentially making your data structure WORSE for reporting by doing this.

    If you want to report in the format that you've outlined, you should really keep the original format as it is, then report using a matrix visual in PBI.

     

    Pete