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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
easton16
Frequent Visitor

Glide path using from to date in data

Good Evening All,

 

A simple one I am hoping but going around in Circles at present.

 

I am making a glide path to show total number of active items each period (have date look up table for period due to changing each year). Each item has a start date and removal date. What is the simplest way of doing this?

 

Currently have two relationships set up between date in periods dates table and Planned Removal Date & Speed Imposed date and being trying to use a measure with calculate function.

 

easton16_0-1644866473236.pngeaston16_1-1644866583851.png

 

Any help much appreciated

 

1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi @easton16 ,

You can refer the content in the following links to get it.

Measure to count active employees in a period based on Slicer Calendar

Count of Active Users In date range

Calculate OPEN CASES over time in Power BI

1. Have a date dimension table first

2. Create a measure as below

Employee Count = 
VAR __DATE = MAX ( 'Date'[Date] )
RETURN
    SUMX (
        EmployeeTable,
        IF (
            EmployeeTable[DateStarted] <= __DATE
                && OR ( EmployeeTable[Leavedates] >= __DATE , ISBLANK(EmployeeTable[Leavedates]) ),
            1,
            BLANK ()
        )
    )

3. Create visual

yingyinr_0-1645154046350.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yiruan-msft
Community Support
Community Support

Hi @easton16 ,

You can refer the content in the following links to get it.

Measure to count active employees in a period based on Slicer Calendar

Count of Active Users In date range

Calculate OPEN CASES over time in Power BI

1. Have a date dimension table first

2. Create a measure as below

Employee Count = 
VAR __DATE = MAX ( 'Date'[Date] )
RETURN
    SUMX (
        EmployeeTable,
        IF (
            EmployeeTable[DateStarted] <= __DATE
                && OR ( EmployeeTable[Leavedates] >= __DATE , ISBLANK(EmployeeTable[Leavedates]) ),
            1,
            BLANK ()
        )
    )

3. Create visual

yingyinr_0-1645154046350.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
easton16
Frequent Visitor

Thanks @amitchandak , Is there anyway I could tweak it slightly?

The finish date in my case is planned in the future or blank if not yet planned to be removed? I have tried to remove the 'ISBLANKS(' bit and some other tweaks but struggling to make it count all of the ones that would fall between the start and planned  finish date or count if blank?

 

Many Thanks

amitchandak
Super User
Super User

@easton16 , This blog and the attached file should help. Current employee you are looking for

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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