Forum Discussion
Cumulative Column Sum between Two Dates
- 7 years ago
Correct.
After rooting around in the forum, I was able to answer my own question using COUNTROWS filtering on those rows I identified as a non-weekend day/non-holiday with a 1
WorkDay =
if(
DateTable[WorkdayCount]=0,
blank(),
calculate(countrows(DateTable),
DATESBETWEEN(DateTable[Date],
STARTOFMONTH(DateTable[Date]),
DateTable[Date]),
DateTable[WorkdayCount]=1,
all(DateTable))
&"WD"
)
Correct.
After rooting around in the forum, I was able to answer my own question using COUNTROWS filtering on those rows I identified as a non-weekend day/non-holiday with a 1
WorkDay =
if(
DateTable[WorkdayCount]=0,
blank(),
calculate(countrows(DateTable),
DATESBETWEEN(DateTable[Date],
STARTOFMONTH(DateTable[Date]),
DateTable[Date]),
DateTable[WorkdayCount]=1,
all(DateTable))
&"WD"
)
rc8425 ok then you can add new column with following DAX, change column and table name as per your data model
Month Work Day = VAR __firstDate = CALCULATE( MAX( Workday[First] ) ) VAR __lastDaste = CALCULATE( MAX( Workday[Last] ) ) RETURN CALCULATE( SUM( Workday[Workday] ), Workday[First] >= __firstDate, Workday[Last] <= __lastDaste )