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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Cumulative change in headcount by month

 

headcount forecast.PNG

 

 

 

Hi I am trying to calculate a headcount forecast. I'am able to calculate the actual headcount for today. This is a calculated measure in my data. We want to calculate a headcount forecast based on the expected in- and outflow. As you can see in the provided example we expect to grow with 14,95 in August and 19,60 people in September. Therefore the cumulative headcount should be 914,95 in August and 934,55 in September.

 

The forecast headcount graph is build on a single measure, sum of inflow chance - sum of outflow chance and plotted on a date dimension table given the expected start and expected end date contract. 

 

headcount data model.PNG

 

Does anybody know how to achieve this? 

 

Thanks in advance!

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @Anonymous,

 

Suppose there are two columns [inflow] and [outflow] in table 'Recruitment chance'. To get the forecast headcount, you could create measures like below:

running inflow measure =
CALCULATE (
    SUM ( 'Recruitment chance'[inflow] ),
    FILTER (
        ALL ( 'Recruitment chance' ),
        'Recruitment chance'[Date] <= MAX ( 'Datedim'[Date] )
    )
)

running outflow measure =
CALCULATE (
    SUM ( 'Recruitment chance'[outflow] ),
    FILTER (
        ALL ( 'Recruitment chance' ),
        'Recruitment chance'[Date] <= MAX ( 'Datedim'[Date] )
    )
)

Running Growth = [running inflow measure]-[running outflow measure]

forcast headcount = [actual headcount for today]+[Running Growth]

Here, 'Recruitment chance'[Date] is the date column that being based on to connect to table 'Datedim'.  [actual headcount for today] is a measure you mentioned above that calculates the actual headcount for today.

 

Then, in column chart, you can add 'Datedim'[Date] into Axis area and add measure [forcast headcount] into Values section.

 

Regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
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-yulgu-msft
Employee
Employee

Hi @Anonymous,

 

Have you worked it out? If yes, would you please mark corresponding reply as an answer so that more users can benefit from here? If you still have any question, please feel free to ask.

 

Regards,
Yuliana Gu

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

Hi @v-yulgu-msft

 

I think we're almost there. So both the [Inlfow] and [Outflow] measure work as expected. The add up as they should do. But when I combine both measures and include actual headcount, the counting starts at the wrong moment. The actual headcount is a measure of the actual headcount for today. In this example 976. So the calculation should start from today instead of incorporating the months before today (154,25 in august). I expect that the actual headcount in October should be 976 +  growth in September.

 

Hopefully you are able to help me out. Thanks in advance.

 

Ronaldfile 1.PNG

v-yulgu-msft
Employee
Employee

Hi @Anonymous,

 

Suppose there are two columns [inflow] and [outflow] in table 'Recruitment chance'. To get the forecast headcount, you could create measures like below:

running inflow measure =
CALCULATE (
    SUM ( 'Recruitment chance'[inflow] ),
    FILTER (
        ALL ( 'Recruitment chance' ),
        'Recruitment chance'[Date] <= MAX ( 'Datedim'[Date] )
    )
)

running outflow measure =
CALCULATE (
    SUM ( 'Recruitment chance'[outflow] ),
    FILTER (
        ALL ( 'Recruitment chance' ),
        'Recruitment chance'[Date] <= MAX ( 'Datedim'[Date] )
    )
)

Running Growth = [running inflow measure]-[running outflow measure]

forcast headcount = [actual headcount for today]+[Running Growth]

Here, 'Recruitment chance'[Date] is the date column that being based on to connect to table 'Datedim'.  [actual headcount for today] is a measure you mentioned above that calculates the actual headcount for today.

 

Then, in column chart, you can add 'Datedim'[Date] into Axis area and add measure [forcast headcount] into Values section.

 

Regards,
Yuliana Gu

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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