Forum Discussion

vips's avatar
vips
Frequent Visitor
6 years ago
Solved

Transforming values in a single column to column header

I have the following data

 

Product IDYear ShippedMonth Shipped$

 

Month has values: Jan, Feb, Mar ... Nov, Dec 

 

Need to transform this to:

Product IDYear ShippedJanFebMarApr...NovDec$

 

Given that I am a newbie at Power BI, would appreciate pointers that a newbie can follow.

 

Many thanks!

  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi vips ,

     

    I'm not sure whether you need to change your data model or show your data like that?

     

    If you don't need to change your data model, you can use Matrix to make it like the below screenshot.

     

    Aiolos Zhao

     

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi vips ,

     

    I'm not sure whether you need to change your data model or show your data like that?

     

    If you don't need to change your data model, you can use Matrix to make it like the below screenshot.

     

    Aiolos Zhao

     

    • vips's avatar
      vips
      Frequent Visitor

      This worked great!! Thanks!

  • Anonymous's avatar
    Anonymous
    Not applicable

    vips 

     

    And if you want to change your data model, you can use the Pivot function in the Power Query Editor.

     

    1. Select the Month Shipped column

    2. Click Pivot Column in Transform tab

    3. Choose $ column, click OK

     

    Aiolos Zhao

  • v-gizhi-msft's avatar
    v-gizhi-msft
    Icon for Community Support rankCommunity Support

    Hi,

     

    According to your description, it is easily to reach your requirement by using matrix visual.

    Here is my test table:

    Then choose a matrix visual and turn off Stepped layout for Row headers:

    The result shows:

    Hope this helps.

     

    Best Regards,

    Giotto Zhi