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

Make a table using steps

Hello How can I put this three steps In one table?

 

agruparpowerbi.jpg

 

1 ACCEPTED SOLUTION

Accepted Solutions
EtienneOL Member
Member

Re: Make a table using steps

Hi @OscarSuarez10 ,

    #"Filtered Rows" = Table.SelectRows(#"Tipo cambiado3", each Text.Contains([Well], "CH")),
    #"Grouped Rows" = Table.Group(#"Filtered Rows", {"Year"}, {{"Ch Oil Production", each List.Sum([WOPT]), type number}}),
    #"Grouped Rows2" = Table.Group(#"Filtered Rows", {"Year"}, {{"Ch Water Production", each List.Sum([WWPT]), type number}}),
    #"Grouped Rows3" = Table.Group(#"Filtered Rows", {"Year"}, {{"Ch Injectes Production", each List.Sum([WWIT]), type number}}),
  #"Join1" = Table.NestedJoin(#"Grouped Rows", {"Year"}, #"Grouped Rows2", {"Year"}, "Ch Water Production", JoinKind.LeftOuter),
#"Expand1" = Table.ExpandTableColumn(#"Join1", "Ch Water Production", {"Ch Water Production"}, {"Ch Water Production"}),
#"Join2" = Table.NestedJoin(#"Expand1", {"Year"}, #"Grouped Rows3", {"Year"}, "Ch Injectes Production", JoinKind.LeftOuter),
#"Expand2" = Table.ExpandTableColumn(#"Join2", "Ch Injectes Production", {"Ch Injectes Production"}, {"Ch Injectes Production"}) in #"Expand2"

Could you try this ? 

 

I didn't try it on power bi but I hope I didn't make any mistakes.. If it does not works tell me i'll react as soon as possible Smiley Wink 

Regards, 

Etienne

5 REPLIES 5
Community Support Team
Community Support Team

Re: Make a table using steps

Hi @OscarSuarez10 

Could you click on the icon to show me the detailed step?

 

Would you want to output the table with "year","cheme***" into another table as a single table?

 

If possible, could you show me the table before "Group Rows" step and final result after the following steps?

 

Best Regards
Maggie

Re: Make a table using steps

Hello I Want to make a table like this:

 

YearCh Oil productionCh Water ProductionCh Injected Production
201925280000888800000
20203634000001500000000
202166050000322100000

 

I used this steps:

 

#"Filtered Rows" = Table.SelectRows(#"Tipo cambiado3", each Text.Contains([Well], "CH")),
#"Grouped Rows" = Table.Group(#"Filtered Rows", {"Year"}, {{"Ch Oil Production", each List.Sum([WOPT]), type number}}),
#"Grouped Rows2" = Table.Group(#"Filtered Rows", {"Year"}, {{"Ch Water Production", each List.Sum([WWPT]), type number}}),
#"Grouped Rows3" = Table.Group(#"Filtered Rows", {"Year"}, {{"Ch Injectes Production", each List.Sum([WWIT]), type number}})
in
#"Grouped Rows3"

Re: Make a table using steps

EtienneOL Member
Member

Re: Make a table using steps

Hi @OscarSuarez10 ,

    #"Filtered Rows" = Table.SelectRows(#"Tipo cambiado3", each Text.Contains([Well], "CH")),
    #"Grouped Rows" = Table.Group(#"Filtered Rows", {"Year"}, {{"Ch Oil Production", each List.Sum([WOPT]), type number}}),
    #"Grouped Rows2" = Table.Group(#"Filtered Rows", {"Year"}, {{"Ch Water Production", each List.Sum([WWPT]), type number}}),
    #"Grouped Rows3" = Table.Group(#"Filtered Rows", {"Year"}, {{"Ch Injectes Production", each List.Sum([WWIT]), type number}}),
  #"Join1" = Table.NestedJoin(#"Grouped Rows", {"Year"}, #"Grouped Rows2", {"Year"}, "Ch Water Production", JoinKind.LeftOuter),
#"Expand1" = Table.ExpandTableColumn(#"Join1", "Ch Water Production", {"Ch Water Production"}, {"Ch Water Production"}),
#"Join2" = Table.NestedJoin(#"Expand1", {"Year"}, #"Grouped Rows3", {"Year"}, "Ch Injectes Production", JoinKind.LeftOuter),
#"Expand2" = Table.ExpandTableColumn(#"Join2", "Ch Injectes Production", {"Ch Injectes Production"}, {"Ch Injectes Production"}) in #"Expand2"

Could you try this ? 

 

I didn't try it on power bi but I hope I didn't make any mistakes.. If it does not works tell me i'll react as soon as possible Smiley Wink 

Regards, 

Etienne

Highlighted

Re: Make a table using steps

Hi @EtienneOL  Thank You it worked!

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: 320 members 3,159 guests
Please welcome our newest community members: