Forum Discussion
mafaber
Helper II
3 years agoCumulative for missing weeks
Hi, I have a table containing demand per product in weekly buckets, I would like to calculate a cumulated demand for all weeks starting week00 to week53 (I have a scope of 1 year). My issue i...
ppm1
Solution Sage
3 years agoYou can create a second query that lists all the week numbers and then merge your original query into that on the weeknumber column. You would then see all weeks (but have null values on the missing ones).
To get started, create a blank query with this as the first step. Then convert that to a table and merge in your existing query.
= List.Transform({1..53}, each "wk" & Text.PadStart(Text.From(_),2,"0"))
Pat
mafaber
Helper II
3 years agoI tried this way, but the issue I got stuck with then is that I got all columns blank, not just the value. Since I have multiple products and the missing week could be first or last, I couldn't simply fill up or down.
How do you deal with this?
Thank you!