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]))
lbendlin
Super User
1 year agoPlease provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523