I’m attempting to calculate the monthly sales orders total using DAX in PowerPivot. I am able to calculate the running total (YTD), but am stuck on how to just capture the monthly total. I’m currently using the below formula for the running total:
Actual Sales Orders column:
=
CALCULATE(
SUM('Sales Orders'[Qty]),
FILTER(
ALLSELECTED('Date Table'[Date]),
ISONORAFTER('Date Table'[Date],MAX('Sales Orders'[Ship Date]),DESC)
)
)```
The [Date] is a daily occurrence, as is the [Ship Date]. Please let me know if I am missing something that would help.
For example, for the month of July, I should see 60 in the field for the Part#, but it's returning the running YTD total of 420.
[enter image description here](https://i.sstatic.net/LULyBSdr.png)
Also, here are the tables being used:
[enter image description here](https://i.sstatic.net/51U25mPH.png)
New contributor
Chad Brown is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.