Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hello! I need to create a running total column for the Print Drop Factor column that resets when the Print Circ column is greater than zero. Here is my sample data below:
Thank you!
Solved! Go to Solution.
Hi, @Ashoop2020 ;
You could add index column first.
Then add custom column.
=List.Accumulate(List.FirstN( #"Added Index"[Print Drop Factor],[Index]),0,(state,current)
=> if current=0 then 0 else state + current
)
Delete index column.
The final result:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlSK1SGONMArgouNlYwFAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Print Drop Factor " = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Print Drop Factor ", Int64.Type}}),
#"Renamed Columns" = Table.RenameColumns(#"Changed Type",{{"Print Drop Factor ", "Print Drop Factor"}}),
#"Added Index" = Table.AddIndexColumn(#"Renamed Columns", "Index", 1, 1, Int64.Type),
#"Added Custom" = Table.AddColumn(#"Added Index", "Custom", each
List.Accumulate(List.FirstN( #"Added Index"[Print Drop Factor],[Index]),0,(state,current)
=> if current=0 then 0 else state + current
)),
#"Removed Columns" = Table.RemoveColumns(#"Added Custom",{"Index"})
in
#"Removed Columns"
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Ashoop2020 ;
You could add index column first.
Then add custom column.
=List.Accumulate(List.FirstN( #"Added Index"[Print Drop Factor],[Index]),0,(state,current)
=> if current=0 then 0 else state + current
)
Delete index column.
The final result:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlSK1SGONMArgouNlYwFAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Print Drop Factor " = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Print Drop Factor ", Int64.Type}}),
#"Renamed Columns" = Table.RenameColumns(#"Changed Type",{{"Print Drop Factor ", "Print Drop Factor"}}),
#"Added Index" = Table.AddIndexColumn(#"Renamed Columns", "Index", 1, 1, Int64.Type),
#"Added Custom" = Table.AddColumn(#"Added Index", "Custom", each
List.Accumulate(List.FirstN( #"Added Index"[Print Drop Factor],[Index]),0,(state,current)
=> if current=0 then 0 else state + current
)),
#"Removed Columns" = Table.RemoveColumns(#"Added Custom",{"Index"})
in
#"Removed Columns"
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.