Forum Discussion
Anonymous
8 years agoNot applicable
Day Count Business Days Between Two Dates
I am currently using the following function for Day Count: Day Count of Drop = SWITCH( TRUE(), 'KPI Dashboard AD'[Campaign Creation Date]<'KPI Dashboard AD'[Start Date], DATEDIFF('KPI Dashboard...
- 8 years ago
I intended it as a measure.
The culprit is this statement:
Business Day Value = if('Date'[DayOfWeek]="Monday"||
'Date'[DayOfWeek]="Tuesday"||
'Date'[DayOfWeek]="Wednesday"||
'Date'[DayOfWeek]="Thursday"||
'Date'[DayOfWeek]="Friday",
"1",
"0")This statement results in a string of either "1" or "0". Change this to:
Business Day Value = if('Date'[DayOfWeek]="Monday"|| 'Date'[DayOfWeek]="Tuesday"|| 'Date'[DayOfWeek]="Wednesday"|| 'Date'[DayOfWeek]="Thursday"|| 'Date'[DayOfWeek]="Friday", 1, 0)and make sure that the Business Day Value column in your calendar table is of type Whole Number. That should do it.
v-jiascu-msft
Microsoft Employee
8 years agoHi Anonymous,
Could you please mark the proper answer as solution or share the solution if it's convenient for you? That will be a big help to the others.
Best Regards!
Dale
Anonymous
8 years agoNot applicable
I have not gotten a solution that works yet.