Forum Discussion
kbrvy
1 year agoRegular Visitor
Rolling Sum Until Certain Date
I am trying to sum past due and not past due order balances. I have order line items with a value, due date, and ship date. I want to sum the value up until the due date to use in a visual as "Not Pa...
- 1 year ago
Hi kbrvy please try this
Past Due Balance =VAR CurrentDate = SELECTEDVALUE('Calendar'[Date])RETURNCALCULATE(SUM(Orders[Value]),FILTER(ALL(Orders),Orders[Due Date] < CurrentDate &&Orders[Ship Date] > CurrentDate),USERELATIONSHIP(Orders[Ship Date], 'Calendar'[Date]))Not Past Due Balance =VAR CurrentDate = SELECTEDVALUE('Calendar'[Date])RETURNCALCULATE(SUM(Orders[Value]),FILTER(Orders,Orders[Due Date] >= CurrentDate &&Orders[Ship Date] > CurrentDate),USERELATIONSHIP(Orders[Ship Date], 'Calendar'[Date]))
kbrvy
1 year agoRegular Visitor
HI, I have now had the chance to try with this query again and was not able to make the proposed solution work for my situation, but have found another solution that will. I appreciate the help. Thanks.
v-karpurapud
Community Support
1 year agoHi kbrvy
We are pleased to hear that you have found a solution. Kindly let us know if it successfully resolved your issue. If it did, please share the details here and mark it as 'Accept as solution' to assist others with similar problems. If it did not, please provide further details.
Thank you.