Forum Discussion
Measure dependent on date
- 6 years ago
Just specify an aggregation such as max to get a single result.
- 6 years ago
Hey v-chuncz-msft, that is exactly what I meanwhile found myself to work perfectly.
Just for reasons of completeness the result looks like that:
WorkingHours = IF(MAX(Plan[DATE])<MAX(Employee[HireDate]);
CALCULATE(SUM(Employee[WorkingHours];
FILTER(Employee;Employee[Employee]<>"NewHireName"));
CALCULATE(SUM(Employee[WorkingHours]))
EmployeeCount = IF(MAX(Plan[DATE])<MAX(Employee[HireDate]);
CALCULATE(DISTINCTCOUNT(Employee[Employee]);
FILTER(Employee;Employee[Employee]<>"NewHireName"));
DISTINCTCOUNT(Employee[Employee]))
WorkDayDount = CALCULATE (
DISTINCTCOUNT(Plan[Date]);
FILTER ('Plan';'Plan'[Weekday] <= 5))
PayedWorkTime = Employee[WorkingHours] / Employee[EmployeeCount] * Plan[WorkDayDount]
Thanks everyone for supporting me!