Forum Discussion
kramaswamy
5 years agoFrequent Visitor
M Function - Advanced Running Total logic
Hello, Let me preface this by saying I'm a complete newb as far as M is concerned. I am a fairly experienced developer generally speaking, though. Any assistance would be greatly appreciated. ...
kramaswamy
5 years agoFrequent Visitor
So as indicated above, the third problem was just my poor reading of my own data. The second problem I've basically also resolved - I can just add new columns with conditional logic based off of the daily_running_sum and weekly_running_sum columns.
I would still like to know if there is a way to combine those two into a single function, though, instead of having to call the function twice - I'm guessing on larger data sets that'll end up being an expensive query to iterate through everything twice.