Forum Discussion
Combine steps in one table
Hello I usted the following code to calculate a total sum of production per year, but now I have 3 differente tables for each product and year, want all of them in one table that have Year, TotalWWIT, TotalWWPT, TotalWOPT, how can I do this?
#"Grouped Rows2" = Table.Group(#"Filtered Rows", {"Year"}, {{"TotalWWIT", each List.Sum([Difference WWIT]), type number}}),
#"Grouped Rows1" = Table.Group(#"Filtered Rows", {"Year"}, {{"TotalWWPT", each List.Sum([Difference WWPT]), type number}}),
#"Grouped Rows" = Table.Group(#"Filtered Rows", {"Year"}, {{"TotalWOPT", each List.Sum([Difference WOPT]), type number}})
5 Replies
- ImkeFCommunity Champion
Hi OscarSuarez10 ,
you can combine most objects in PQ using the ampersand ("&").
#"Grouped Rows2" & #"Grouped Rows1" & #"Grouped Rows1"
- OscarSuarez10Helper III
I don´t understand, do I have to use table.addcolumn and inside it this:
#"Grouped Rows2" & #"Grouped Rows1" & #"Grouped Rows1"
???
- ImkeFCommunity Champion
If you just want to return this as one table, you just add a new step manually and paste the code there (overwrting the name of the previous step, that will appear as the default-value):
- OscarSuarez10Helper III
I got this error When I used the previous step: