最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

powerbi - Counting objects based on selected Start and End Date DAX power BI - Stack Overflow

programmeradmin6浏览0评论

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
发布评论

评论列表(0)

  1. 暂无评论