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
OscarSuarez10
Helper III
Helper III

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
OscarSuarez10
Helper III
Helper III

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

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

??? 

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

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

I got this error When I used the previous step:

 

Error al agregar paso.JPG

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.
ImkeF
Super User
Super User

Hi @OscarSuarez10 ,

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

 

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

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors