Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
saadghojaria
Frequent Visitor

I have connected my Calendar Table with two dates for Project Tracking Data

Problem Statement : I want to track projects running , starting and ending in specific date range ( I'm using this range in slicer) 

 

My Calendar Table looks like this it is connected to my Projects startdate and enddate

 

saadghojaria_1-1688887104169.png

 

ongoing =
    VAR MinDate =
        CALCULATE ( MIN ( 'Calendar'[Date] ), ALLSELECTED ( 'Calendar'[Date] ) )
    VAR MaxDate =
        CALCULATE ( MAX ( 'Calendar'[Date] ), ALLSELECTED ( 'Calendar'[Date] ) )
    VAR StartDateFiltered =
        CALCULATETABLE (
            'Master Projects',
            USERELATIONSHIP('Master Projects'[Start Date], 'Calendar'[Date])
        )
    VAR EndDateFiltered =
        CALCULATETABLE (
            'Master Projects',
            USERELATIONSHIP('Master Projects'[End date], 'Calendar'[Date])
        )
    RETURN
        COUNTROWS (
            FILTER (
                INTERSECT(StartDateFiltered, EndDateFiltered),
                ('Master Projects'[Start Date] <= MaxDate && 'Master Projects'[End date] >= MinDate)
            )
        )
 
 
ending =
    VAR MinDate =
        CALCULATE ( MIN ( 'Calendar'[Date] ), ALLSELECTED ( 'Calendar'[Date] ) )
    VAR MaxDate =
        CALCULATE ( MAX ( 'Calendar'[Date] ), ALLSELECTED ( 'Calendar'[Date] ) )
    RETURN
        CALCULATE (
            COUNTROWS ( 'Master Projects' ),
            FILTER (
                'Master Projects',
                ('Master Projects'[End date] >= MinDate
                    || 'Master Projects'[End date] <= MaxDate)
            ),
            USERELATIONSHIP('Master Projects'[End date], 'Calendar'[Date])
        )

starting =
    VAR MinDate =
        CALCULATE ( MIN ( 'Calendar'[Date] ), ALLSELECTED ( 'Calendar'[Date] ) )
    VAR MaxDate =
        CALCULATE ( MAX ( 'Calendar'[Date] ), ALLSELECTED ( 'Calendar'[Date] ) )
    RETURN
        CALCULATE (
            COUNTROWS ( 'Master Projects' ),
            FILTER (
                'Master Projects',
                ('Master Projects'[Start Date] >= MinDate
                    && 'Master Projects'[Start Date] <= MaxDate)
            ),
              USERELATIONSHIP('Master Projects'[Start Date], 'Calendar'[Date])
        )

Current Output : 
saadghojaria_3-1688887367303.png

Expected output is in Excel Sheet I checked for year 2024 it should be around 100 projects in total including all statuses. 

saadghojaria_4-1688887542980.png

 

 

Please help I tried many different solutions.

Referred code : Solved: How do I create a report which shows running, new,... - Microsoft Fabric Community



 



 

 

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@saadghojaria , check if one of two methods can help

Power BI: HR Analytics - Employees as on Date : https://youtu.be/e6Y-l_JtCq4
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

 

Matrix as Project plan Visual: https://youtu.be/R25QoiyoSVs

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@saadghojaria , check if one of two methods can help

Power BI: HR Analytics - Employees as on Date : https://youtu.be/e6Y-l_JtCq4
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

 

Matrix as Project plan Visual: https://youtu.be/R25QoiyoSVs

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors