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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
KKilpatrick34
Regular Visitor

How to Calculate Weekly Average Per Person

Hi I am looking to do a weekly average for days that employees clock into an office using the data held in this data per employee but unsure what formula to use if anyone had any ideas they would be greatly appriciated! I am wanting to put the Weekly Averages into a graph to show each individual employees average office days a week. 

 

 

Office Numbers.PNG

2 ACCEPTED SOLUTIONS
speedramps
Super User
Super User

Use Power Query to crate a calenadar file with contgius dates and week using Date.StartOfWeek

Learn about calandars here Calendar Table training

 

Relate the calendar to your fact table by date

 

Create a measures

 

numberofdays = DISTINCTCOUNT(tablename[Date]]

 

Then produce a report ro graph of nunberofdays by calendar[week]]

 

Thanks for reaching out for help.

I put in a lot of effort to help you, now please quickly help me by giving kudos.

Remember we are unpaid volunteers and here to coach you with Power BI and DAX skills and techniques, not do the users job for them. So please click the thumbs up and accept as solution button. 

If you give someone a fish then you only give them one meal, but if you teach them how to fish then they can feed themselves and teach others for a lifetime.  I prefer to teach members on this forum techniques rather give full solutions and do their job. You can then adapt the technique for your solution, learn some DAX skills for next time and soon become a Power BI Super User like me. 

One question per ticket please. If you need to extend your request then please raise a new ticket.

You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you ! 

 

 

 

View solution in original post

v-yanjiang-msft
Community Support
Community Support

Hi @KKilpatrick34 ,

According to your description, in my understanding, you want to calculate the number of days per employee per week. In this way, it has nothing to do with the time in and out per day, here's my solution.

First create a calculated column.

Week = WEEKNUM('Table'[date])

Result:

vkalyjmsft_0-1666592724607.png

Then in a line chart, put Week in X-axis, Name in Legend and date in Y-axis, select Count in Y-axis field. Get the result:

vkalyjmsft_1-1666592763826.png

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

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-yanjiang-msft
Community Support
Community Support

Hi @KKilpatrick34 ,

According to your description, in my understanding, you want to calculate the number of days per employee per week. In this way, it has nothing to do with the time in and out per day, here's my solution.

First create a calculated column.

Week = WEEKNUM('Table'[date])

Result:

vkalyjmsft_0-1666592724607.png

Then in a line chart, put Week in X-axis, Name in Legend and date in Y-axis, select Count in Y-axis field. Get the result:

vkalyjmsft_1-1666592763826.png

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Gianluca88
Resolver I
Resolver I

Hi @KKilpatrick34 ,

please could you share this excel sample db by we transfer for example?

 

Moreover, just to confirm, would you like to have another column in the table in which there is the average number of minutes in which an employee stays in the office for a certain week? So the result will be the same for records that have the same employee and the same week number, correct?

 

Thanks,

g

speedramps
Super User
Super User

Use Power Query to crate a calenadar file with contgius dates and week using Date.StartOfWeek

Learn about calandars here Calendar Table training

 

Relate the calendar to your fact table by date

 

Create a measures

 

numberofdays = DISTINCTCOUNT(tablename[Date]]

 

Then produce a report ro graph of nunberofdays by calendar[week]]

 

Thanks for reaching out for help.

I put in a lot of effort to help you, now please quickly help me by giving kudos.

Remember we are unpaid volunteers and here to coach you with Power BI and DAX skills and techniques, not do the users job for them. So please click the thumbs up and accept as solution button. 

If you give someone a fish then you only give them one meal, but if you teach them how to fish then they can feed themselves and teach others for a lifetime.  I prefer to teach members on this forum techniques rather give full solutions and do their job. You can then adapt the technique for your solution, learn some DAX skills for next time and soon become a Power BI Super User like me. 

One question per ticket please. If you need to extend your request then please raise a new ticket.

You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you ! 

 

 

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Kudoed Authors