Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago
Solved

pivot data

hello,

 

I am new to powerbi. I have tried to use my data below to pivot to my desired output and i am struggling and it is not working. Any help will be definitely helpful to me.

 

periodCategory ACategory BCategory C
Jan-1522223
Feb-1535567
Mar-1526699
Apr-1514422
May-1546733
Jun-1554534

 

DESIRED OUTPUT

periodJan-15Feb-15Mar-15Apr-15May-15Jun-15
Category A232145
Category B225566446745
Category C236799223334

 

 

THANK you!!!

  • Anonymous's avatar
    Anonymous
    9 years ago

    In the query editor, select your Period column and hit Unpivot Other Columns. Then select Period again and hit Pivot Column. Value should be the Values column, then open the advanced options and change it to Don't Aggregate.

  • Sean's avatar
    Sean
    9 years ago

    I would only select Period and Upivot Other Columns

    Then create a Matrix place Period in Columns, Category (Attribute) in Rows and Value in Values

    The data will remain in better shape for analysis than your final desired output but you'll still be able to achieve it :smileyhappy:

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    In the query editor, select your Period column and hit Unpivot Other Columns. Then select Period again and hit Pivot Column. Value should be the Values column, then open the advanced options and change it to Don't Aggregate.

    • Sean's avatar
      Sean
      Community Champion

      I would only select Period and Upivot Other Columns

      Then create a Matrix place Period in Columns, Category (Attribute) in Rows and Value in Values

      The data will remain in better shape for analysis than your final desired output but you'll still be able to achieve it :smileyhappy:

      • Anonymous's avatar
        Anonymous
        Not applicable

        Seanusually I'm the one who tells people they should use a different method instead of just telling them how to get the thing they asked for. :smileylol: