Forum Discussion
kassymov_su
4 years agoFrequent Visitor
Add subtotal Rows
Hi All, I have a data with more than 2k activities in and with a column [Code for Area]. I need to group them by [Code for Area] and add a subtotal rows at the beginning of each group with Gruop ...
- 4 years ago
NewStep=Table.Combine(Table.Group(PreviousStepName,"Code for Area",{"n",each #table(Table.ColumnNames(_),{{Text.Replace([Code for Area]{0},"-"," Works at Area "),null,List.Sum([Volumes])}})&_)})[n])
Anonymous
4 years agoNot applicable
Hi kassymov_su ,
Actually in Power BI Desktop or Power Query, there is no direct way like a button to add a column to add rows to table .
Usually we will Transpose the table -->Add columns --> Transpose again to indirectly add rows, or use M function—— Table.InsertRows() which is not easy.
So I think the method provided by wdx223_Daniel to add columns and show them in Matrix visual is the most efficient.
Best Regards,
Eyelyn Qin