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]))
v-karpurapud
Community Support
1 year agoHi kbrvy
Could you please confirm if your query have been resolved the solution provided by techies ? If they have, kindly mark the helpful response and accept it as the solution. This will assist other community members in resolving similar issues more efficiently. If it is not resolved, please share the sample data and provide us the detailed information regarding expected output. It will help us to assist you better.
Thank You!