Forum Discussion
Dax Calculation Between Dates
Hi,
The Excel source I'm refering to is :
But don't worry, I have a very simple solution for you :
Since you have a date table with 0 and 1 in working days column, you just need to sum this column to get what you want. Only rows with 1 will be "counted" in the sum, since the rows with 0 are not changing your sum.
So first you need to filter in a calculate the period you need (ie start date is your orderplaced_date, and end date your orderfilled_date).
You can use function like DATESBETWEEN,
or filter like >orderplaced_date && <orderfilled_date (&& meaning AND operator) to filter the period needed.
And in this period you SUM the column Working days.
Count of days (wk days) = CALCULATE( SUM( [WorkDays] ) , DATESBETWEEN ( [DateColumn from date table] , orderplaced_date , orderfilled_date )
Hope it helps
I don't think you're looking at my file. That excel source isn't mine and I don't use onedrive. Looking at that measure I don't know how that would work since there's nothing that connects the order numbers together, if that makes sense. Like I don't know how it could know to calculate the difference in dates for order number 1.