Forum Discussion
bklyn3
4 years agoAdvocate II
Using DAX for a running sum based on dates
Hello I have a table with OrderID, Order_Date and Ship_Date. I am trying to add a column with the number of Open order (i.e. ordered but not yet ship) at the day a new order is placed. That i...
- 4 years ago
Hi, bklyn3 ;
You could create a measure,
Measure = CALCULATE(COUNT('Table'[OrderID]),FILTER(ALL('Table'),[Order_Date ]<=MAX('Table'[Order_Date ])&&[Ship_Date]>MAX('Table'[Order_Date ])))The final output is shown below:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-yalanwu-msft
4 years agoCommunity Support
Hi, bklyn3 ;
You could create a measure,
Measure = CALCULATE(COUNT('Table'[OrderID]),FILTER(ALL('Table'),[Order_Date ]<=MAX('Table'[Order_Date ])&&[Ship_Date]>MAX('Table'[Order_Date ])))
The final output is shown below:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.