Forum Discussion

stu_adz's avatar
stu_adz
Frequent Visitor
2 years ago
Solved

Summarize and transpose into new table using column headers as row labels

Hi there,

 

I have looked at similiar posts but the solutions presented did not seem to work for me.

I am very new to PowerBI and I have the following sampe data set:

 

I am trying to achieve the below in a new table:

 

I need to sum the total for each type by period but then tranpose the periods to rows and have the types as columns.

I have been playing with the summarize function and the closest I have got to is:

 

Any help much appreciated.  Thanks

 

  • Hi, stu_adz 

     

    You can try the following methods. Select the first two columns-Unpivot Other columns:

    Result:

    Using the matrix view:

    Is this the result you expect?

     

    Best Regards,

    Community Support Team _Charlotte

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

3 Replies

    • stu_adz's avatar
      stu_adz
      Frequent Visitor

      Hi, thanks for your reply.

       

      When I apply this to my data, I get an error message that says:

       

      Column 'Period 1 Value' in table '23_24' cannot be found or may not be used in this expression. Column 'Nominal' in Table '23_24' contains a duplicate value '0001-0001' and this is not allowed for columns on the one side of a many-to-one relationship or for columns that are used as the primary key of a table.

       

      This is because I have other table that are linked to the one I am unpivoting.  Is there another way around this?

       

      Thanks

  • v-zhangti's avatar
    v-zhangti
    Icon for Community Support rankCommunity Support

    Hi, stu_adz 

     

    You can try the following methods. Select the first two columns-Unpivot Other columns:

    Result:

    Using the matrix view:

    Is this the result you expect?

     

    Best Regards,

    Community Support Team _Charlotte

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.