cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Table.InsertRow - Sum one Column to cell

Hi, i got this table:

 

Shkr_0-1619527810261.png

 

The last row is a step where i have used this code to create the the step. 

 

#"Grouped Rows" = Table.Group(#"Changed Type", {"Source.Name"}, {{"Count", each Table.InsertRows(_,Table.RowCount(_),{[Source.Name="", Kontoart=39100, Stedsart="", #"Beskrivelse - Prognose"="Tekst", År=2020, Periode=1, Beløp=5]})}}),

 

In inserted rows column "Beløp" i want to sum all the values above.  What code do i put in instead og "5"? 

 

 

Bonus task: I also want to use an "if" statement to sum only if Column "Stedsart" is "47700"   

1 ACCEPTED SOLUTION
Rocco_sprmnt21
Super User
Super User

prova questa:

 

#"Grouped Rows" = Table.Group(#"Changed Type", {"Source.Name"}, {{"Count", each Table.InsertRows(_,Table.RowCount(_),{[Source.Name="", Kontoart=39100, Stedsart="", #"Beskrivelse - Prognose"="Tekst", År=2020, Periode=1, Beløp=List.Sum([Belop])]})}}),

 

Bonus task: quale riga della colonna Stedsart deve essere controllata?

View solution in original post

1 REPLY 1
Rocco_sprmnt21
Super User
Super User

prova questa:

 

#"Grouped Rows" = Table.Group(#"Changed Type", {"Source.Name"}, {{"Count", each Table.InsertRows(_,Table.RowCount(_),{[Source.Name="", Kontoart=39100, Stedsart="", #"Beskrivelse - Prognose"="Tekst", År=2020, Periode=1, Beløp=List.Sum([Belop])]})}}),

 

Bonus task: quale riga della colonna Stedsart deve essere controllata?

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Kudoed Authors