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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Human Resources Sample File - Employee Table

Hi Everyone

 

I've been looking at the Human Resources Sample File today in PowerBi Desktop and I think I understand how eveything works and how I could build something similar using my own organsiations data.

 

One thing I'm struggling why we need the date field as the fist field in the employee table, if we didnt have that there and it was just the employee ID what would happen?

 

Capture.PNG

 

 

3 ACCEPTED SOLUTIONS
v-chuncz-msft
Community Support
Community Support

@Anonymous,

 

You may just disable the relationship to see the difference.

Community Support Team _ Sam Zha
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

Anonymous
Not applicable

 

 

Now Understood: The Date column in the Employee Table is used as follows:

 

In this dataset, once a month, an extract from the source system is produced. For each month that an employee is active they have a line of data on the first of the month as an employee “snapshot” fact table.

 

I read the "Data Warehouse Toolkit by Ralph Kimball and Margy Ross which has a small but useful section on thinking about models for HR and how to strucutre them.

 

powerbi hr file.PNG

View solution in original post

Anonymous
Not applicable

Hi @Anonymous 

 

I cant find the original post I personally found a soultion for, but this is what you can do, create these 4 messurements,

 

New Hires = COUNTA ("employment hire date")
 
Terminated = CALCULATE(COUNTA(("your employments hire date"), USERELATIONSHIP('Calendar'[Date], ("employment termination date"))
 
Balance = [New Hires] - [Terminated]
 
Overall Current Employees = CALCULATE([Balance], FILTER (ALL('Calendar'[Date]), 'Calendar'[Date] <= MAX ('Calendar'[Date])))
 
P.S Use a generated calander date table to make a relansionship between the hire date and termination date, and you will be good to go 🙂

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

@Anonymous 

 

Hi, 

 

Did you ever find a soultion for this, im struggeling to understand what the date in employee table actuly represents ?

 

 

Anonymous
Not applicable

 

 

Now Understood: The Date column in the Employee Table is used as follows:

 

In this dataset, once a month, an extract from the source system is produced. For each month that an employee is active they have a line of data on the first of the month as an employee “snapshot” fact table.

 

I read the "Data Warehouse Toolkit by Ralph Kimball and Margy Ross which has a small but useful section on thinking about models for HR and how to strucutre them.

 

powerbi hr file.PNG

Anonymous
Not applicable

Makes sense, cant belive I dident figure it out, its so obvious now, especially when looking at single emp ID's 🙂

 

Thanks @Anonymous 

 

 

Anonymous
Not applicable

Yes, I'm not sure where I would get that date from my own data. I just have Hire/Termination date.

 

Edit: I see now, each employee line is duplicated for each month of their employment. Not sure how to duplicate this in my own table.

Anonymous
Not applicable

Hi @Anonymous 

 

I cant find the original post I personally found a soultion for, but this is what you can do, create these 4 messurements,

 

New Hires = COUNTA ("employment hire date")
 
Terminated = CALCULATE(COUNTA(("your employments hire date"), USERELATIONSHIP('Calendar'[Date], ("employment termination date"))
 
Balance = [New Hires] - [Terminated]
 
Overall Current Employees = CALCULATE([Balance], FILTER (ALL('Calendar'[Date]), 'Calendar'[Date] <= MAX ('Calendar'[Date])))
 
P.S Use a generated calander date table to make a relansionship between the hire date and termination date, and you will be good to go 🙂
v-chuncz-msft
Community Support
Community Support

@Anonymous,

 

You may just disable the relationship to see the difference.

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

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.