Dear All please help me to finalize some dutie in Power BI. I'm actualy working to create a dashboard for analizing leave day. The issue I'm facing is I cann't count only colleagues are filed their timesheet for leave and let other colleagues who have not done it. NB: I have created a date Table for sciling each month and show colleague are left or plan to leave. Below my code witch count also the reste of colleagues.If your leave extends over two months, each month is counted
Number of Staff on leave =
COUNTROWS(
FILTER(
DISTINCT('Annual Leave'[First Name] ),
CALCULATE(
NOT ISEMPTY( 'Dates'),
KEEPFILTERS(
CALCULATETABLE(
DATESBETWEEN(DATES[Date], MAX( 'Annual Leave'[Leave Start Time] ), MAX( 'Annual Leave'[Leave End Time] ) )
)
)
)
)
)
First Name | Leave Start Time | Leave End Time |
---|---|---|
Blaise | Friday 4 october 2024 | Wednesday 30 octobre 2024 |
Balde | Friday 1 november 2024 | Monday 18 novembre 2024 |
Koffi | Saturday 22 juin 2024 | Monday 15 juillet 2024 |
Bob | Monday 9 décembre 2024 | Sunday 2 février 2025 |
Anouma | Saturday 4 janvier 2025 | Saturday 1 février 2025 |
Lyse | Sunday 27 octobre 2024 | Thurday 14 novembre 2024 |
Izi | Wednesday 15 janvier 2025 | Monday 3 février 2025 |
Nova | ||
Pires | ||
Losto | ||
Bycan | ||
Poomc |