Forum Discussion
Anonymous
2 years agoNot applicable
Creating a custom column that calculates the previous row value by previous hour, date, & store
Hi, I'm really struggling with this. I'm trying to create a custom column that calculate the previous row Total Consumed (w/o Cancellations) column. The Total Consumed (w/o Cancellations) column ...
ronrsnfld
Super User
2 years agoIf your logic is to calculate the difference between two rows, given a matching "Store-Ke" and "Date", you are going to have at least one negative value given the data you show in your second picture. If negative values cannot exist, you may need to rethink your logic.
Anonymous
2 years agoNot applicable
I think a logic can be placed if there is negative numbers. If negative, then bring back 0 as technically 0 orders would have been orders dropped to that store for that hour and date. However, trying to come up with the entire logic is where i'm struggling.