Forum Discussion

LiamReidy's avatar
LiamReidy
Helper I
4 years ago
Solved

Timephased Data Resource Planning

Hi Power Bi Community,   I have a dataset in excel that keeps a record of roles within an organisation including the date range for each role and when a resource is available for the role. See smal...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi LiamReidy ,

    You can refer the following links to achieve it.

    Total Number Of Staff Over Time - Power BI Insights

    Calculating Employee Attrition with DAX

    1. Create one if there is no date dimension table in your model

    2. Create a similar measure as below to get the number of available staff and required staff

    Number of available staff =
    VAR _seldate =
        SELECTEDVALUE ( 'Date'[Date] )
    RETURN
        CALCULATE (
            DISTINCTCOUNT ( 'table'[staffid] ),
            FILTER (
                'table',
                'table'[post begins from date] <= _seldate
                    && 'table'[post end date] > _seldate
            )
        )

    3. Create a line chart (Axis: Date field of Date dimension table  Values: measures)

    If the two links above don't help you get the results you want, could you please provide more sample data (containing staff information, relationships between tables, etc.), the logic of the calculation (how the Demand and Capacity are obtained). It seems that the table data you provided before contains staff information. By the way, what is the real start date column used for? If possible, could you please give me an example of the final result you want based on the existing example data and the calculation logic. Thank you.

    Best Regards