Working on an SSAS Tabular project in Visual Studio 2010;
I'm trying to create a measure that calculates the total number of business days in a month:
I have Month Start Date
and Month End Date
measures, and Date
and Is Business Day
columns.
I can create a Total Business Days
measure with COUNTROWS(FILTER(Dates,Dates[Is Business Day]=TRUE()))
. That gives me the number of business days in the context, but I want the number of business days for the current month.
I've tried various combinations of FILTER
, COUNT
, COUNTX
, COUNTROWS
, DATESBETWEEN
, and CALCULATE
without success.
What I want is a count of days between two dates, where the column [Is Business Day]
is true, but I can't seem to get the right combination of filtering.
I would guess I filter the Dates table the way I do for the Total Business Days
measure, but FILTER
returns a table and COUNTROWS
expects a single column - is there a way to get single column from a FILTER
result?