Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
stu_adz
Frequent Visitor

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:

 

stu_adz_0-1696939818032.png

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

 

stu_adz_1-1696939896381.png

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:

 

stu_adz_2-1696940078835.png

Any help much appreciated.  Thanks

 

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @stu_adz 

 

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

vzhangti_0-1697091292657.png

Result:

vzhangti_1-1697091319979.png

Using the matrix view:

vzhangti_2-1697091657061.png

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.

 

View solution in original post

3 REPLIES 3
v-zhangti
Community Support
Community Support

Hi, @stu_adz 

 

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

vzhangti_0-1697091292657.png

Result:

vzhangti_1-1697091319979.png

Using the matrix view:

vzhangti_2-1697091657061.png

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.

 

mh2587
Super User
Super User

You can unpivot this from Power Query.


Did I answer your question? If so, please mark my post as a solution!


Proud to be a Super User!




LinkedIn Icon
Muhammad Hasnain



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

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.