Forum Discussion

HKInd's avatar
HKInd
Icon for Helper I rankHelper I
3 years ago

How to Create Cards for Opening Head Count and Closing Head Count in Power BI?

Hello Power BI community,

I'm working on a Power BI report, and I need some assistance with creating cards that display the Opening Head Count and Closing Head Count. Here's a brief description of what I'm trying to achieve:

Opening Head Count (OHC): I want to create a card that shows the number of active employees at the start of the selected period. If I choose Apr as the start month, it should display the count of active employees in March.

Closing Head Count (CHC): Similarly, I'd like to create another card that displays the number of active employees at the end of the selected period, which in my case is May.

 

Please Click on download icone to download file after clicking on below link.

PBI File

https://www.dropbox.com/scl/fi/68ddkf568htd7eee1y9gu/HR-Use-Case.pbix?rlkey=nv6b5vnac8wlga8du8wmhh4cu&dl=0 

Excel File

https://www.dropbox.com/scl/fi/6gyyv1y2yx9h0xvosym05/HR-Data.xlsx?rlkey=r2ngb9qqld4gtma5bixzziv4n&dl=0

 

Thanks in advance

2 Replies

  • Hi HKInd 

    I downloaded and looked at your pbix file, and noticed that your fact table is not the standard employee database with the information which has employee ID, employee name, joining date and leaving date fields. In fact, to do headcount analysis properly, the standard way is to just utilize the employee master data wich the above basic information and use the disconnected calendar table and the employee fact table to do a flexible headcount calculation which respects time dimention at any historical points in time.  I attach the link to the article which talks about this topic.    

    Dynamic multi-year headcount analysis using PowerPivot for Excel | LinkedIn

    If you'd like me to share with you a sample pbix file for the headcount dax measure using a sample employee table, please let me know.  

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi HKInd ,

    Please refer to the attached pbix file.

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum