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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

How do you guys calculate difference between standard working hours and actual working hours?

Hi,

 

I'm currently working on creating a calculation for "Actual working hours" by "Standard working hours", and was wondering if you had any input to my case, or would share how you would have done it.

 

Data:

'EMPLOYEE' - table with all data related to the employees.

EMPLOYEE[ID] - Unique ID for the employee

EMPLOYEE[NAME] - Name of the employee

EMPLOYEE[STDHRS] - this tells how many hours the employee are required to work each week

 

'PROJTABLE' - "General view" Table for all projects

PROJTABLE[NUMBER_] - Unique Project ID

PROJTABLE[NAME] - Project name (some have the same name)

PROJTABLE[SEACHNAME] - Recipient of the completed project, this can be a employee, customer or the company itself.

 

'PROJTRANS' - All transactions to all projects.

PROJTRANS[EMPLOYEE] - Employee ID

PROJTRANS[NUMBER_] - Project ID

PROJTRANS[COSTTYPE] - ID for a cost type used

PROJTRANS[QTY] - quantity used on the transaction, the unit changes based on COSTTYPE.

 

Goal:

compare PROJTRANS[QTY] (with a filter on two specific PROJTRANS[COSTTYPE]) with EMPLOYEE[STDHRS] and show how far the employee is from or over the goal in percentage.

Maybe something like this: 

 JanFebMarApr
Anakin Skywalker+10,00%-5,00%+0,50%-20,00%
Ronan Dex+20,25%+7,50%+1,00%+6,75%
Peter Parker-15,00%-17,00%-13,75%-5,00%

 

Notes:

it might be relevent to know that the PROJTRANS table contains roughly 300.000 rows, and grows around 80-100 rows earch day.

 

 

2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @Anonymous 

 

Can you provide sample data for testing? Sensitive information can be removed in advance.

Best Regards

 

Anonymous
Not applicable

Hi @v-zhangti 

I've created some test data from det original, all sensitive info have been changed.

 

in the folder you'll find 3 files.

STDHRS Demo.xlsx - the datasource (mirroring how the original data is)

STDHRS Demo CLEAN.pbix - the data source have been loaded and nothing else.

STDHRS Demo.pbix - populated report with insight into how i usally would create the measures/relations etc.  

 

https://ecitas-my.sharepoint.com/:f:/g/personal/bsf_ecitsolutions_dk/EriOE4kHTAtOuJWl_qklSHQBQsRLOE5...

 

again, i'm not saying my method is correct in any way, so any pointers to a smarter/faster/more beautiful way is more then welcome 🙂

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Top Kudoed Authors