cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

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 5
Super User
Super User

Re: Combine steps in one table

Hi @OscarSuarez10 ,

you can combine most objects in PQ using the ampersand ("&").

 

#"Grouped Rows2" & #"Grouped Rows1" & #"Grouped Rows1"

 

Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

Imke Feldmann

How to integrate M-code into your solution -- Check out more PBI- learning resources here -- Performance Tipps for M-queries




Re: Combine steps in one table

I don´t understand, do I have to use table.addcolumn and inside it this: 

#"Grouped Rows2" & #"Grouped Rows1" & #"Grouped Rows1" 

??? 

Super User
Super User

Re: Combine steps in one table

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):

 

image.png

 

Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

Imke Feldmann

How to integrate M-code into your solution -- Check out more PBI- learning resources here -- Performance Tipps for M-queries




Highlighted

Re: Combine steps in one table

I got this error When I used the previous step:

 

Error al agregar paso.JPG

Community Support Team
Community Support Team

Re: Combine steps in one table

Hi @OscarSuarez10 ,

Do you add the step before the "Difference WWPT"?

If it is convenient, could you share your M query so that we could give further advice?

@ImkeF ,any ideas?

Best  Regard,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Power BI Helps Homeless and Trouble Youth

Power BI Helps Homeless and Trouble Youth

We spoke with Power BI Super User, Greg Deckler, about his charity work

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 45 members 1,293 guests
Please welcome our newest community members: