Hi,
I've managed to do running totals by grouped data in power query by performing the process on one of the grouped tables then converting to a function
and invoking on within the original.
So,
< (GroupTotal) =>
let
Index = Table.AddIndexColumn( GroupTotal , "Index" , 1, 1, Int64.Type),
buffer = Index[Units] ,
Output = Table.AddColumn ( Index ,"RTC" , each List.Sum (List.FirstN( buffer , [ Index ] ) ) )
in
Output >
Rather than having this a function in itself, I've seen a couple of tutorials where it is added in the advanced editor to the grouped data,
but I keep getting it wrong.
Any reading recommendations welcome, I find a lot of YouTube vids a bit hard as if not familiar with syntax it's easy to miss somthing.
I've attached the sheets I've been playing around with.
Richard
Bookmarks