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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Get Column Table Summary from Same Column Header Name

Hello,

 

Good day! Pls your support to assist how can i get the summary from table column header name to another table row name value.

 

This should be my result table.

MonthTotal

Jan Target

6
Feb Target15
March Target24

 

 

 

This is the main table i have.

PO IDJan TargetFeb TargetMar Target
123-A147
456-B258
789-C369
1 ACCEPTED SOLUTION

Use this link to connect to Sharepoint list - https://docs.microsoft.com/en-us/power-query/connectors/sharepointlist 

In the last step, select Transform which will take you to the PQ. Here, Home - Advanced Editor - Copy the 2nd line which starts with Source and paste into a notepad

Now remove everything from advanced editor.

Copy my code there.

Replace source line from notepad.

Now OK.

#"Changed Type", you will need to remove as it contains only Jan to Mar  and do your own Changed Type in the Power Query after Source step.

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Thanks Vijay. It works fine.. 

Spoiler
 

May i know how could i able to use the existing table as a source.

 

Also, how could i plot the month as a bar chart with Jan, Feb.. as month in correct order.. 

 

Thanks again.

What is your source? Are you using Power BI Desktop to plot the graph?

Anonymous
Not applicable

yes.. im using the sharepoint list as my data source.

Use this link to connect to Sharepoint list - https://docs.microsoft.com/en-us/power-query/connectors/sharepointlist 

In the last step, select Transform which will take you to the PQ. Here, Home - Advanced Editor - Copy the 2nd line which starts with Source and paste into a notepad

Now remove everything from advanced editor.

Copy my code there.

Replace source line from notepad.

Now OK.

#"Changed Type", you will need to remove as it contains only Jan to Mar  and do your own Changed Type in the Power Query after Source step.

Anonymous
Not applicable

Great. Thanks for your support.

Vijay_A_Verma
Super User
Super User

Open a blank query - Home - Advanced Editor - Remove everything from there and paste the below code (later on when you use the query, you will have to change the source)

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("HcixEQAgCATBXj6WQBTFUC2Dof82/DHY4C4CVZtsFFTqNJEl0G3IYSkZ+b/Tl1xWo0ELmQ8=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"PO ID" = _t, #"Jan Target" = _t, #"Feb Target" = _t, #"Mar Target" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"PO ID", type text}, {"Jan Target", Int64.Type}, {"Feb Target", Int64.Type}, {"Mar Target", Int64.Type}}),
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"PO ID"}, "Attribute", "Value"),
    #"Grouped Rows" = Table.Group(#"Unpivoted Other Columns", {"Attribute"}, {{"Total", each List.Sum([Value]), type number}}),
    #"Renamed Columns" = Table.RenameColumns(#"Grouped Rows",{{"Attribute", "Month"}})
in
    #"Renamed Columns"

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.