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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
toovishant
Helper II
Helper II

How to create a view to Calculate count of employees by Weekdays for a selected period

Hi Team,

 

Need to create a view that determines how many days in a week the employees prefer to come office. 

 

Below is the sample data set.

https://docs.google.com/spreadsheets/d/16eDvf4QESH_gDhw4tk_tYSEnZ77ORf2Y/edit?usp=sharing&ouid=10867...

 

Required View 

For below Ex:  Total employees 110,650 came to the office for the given period and below are the number of days in a week they prefer to come to office. The below view shows most of the employees for the selected period, most of them pefer to come 1, 2 and 3 days in a week and less prefer for 4 to 7 days a week  

toovishant_0-1703780831695.png

 

Thanks,

Vishant

5 REPLIES 5
toovishant
Helper II
Helper II

@aj1973  - Its not the count by weekdays, but mention how many are coming 1 day, 2 days, 3 days, 4 days, 5 days, 6 days and 7 days in a week.

For Ex: if I select the data set for a period 1st July to  30th Nov 2023. I need to know for this selected period.

Hoe prefer to come 1 day, 2 days , 3 days 4 days and 5 days 

 

Regards,

Vishant

 

gadielsolis
Resolver III
Resolver III

Hello,

 

Here is the solution I propose:

1-Create a calculated column to extract the start of week for the date

Week =
    Sheet1[Date]-WEEKDAY(Sheet1[Date],2)+1

2-Create a calculated column to calculate the number of rows for that employee within that week (that should be the number of days that the employee came to the office): 

Days in the week =
        CALCULATE(COUNTROWS(Sheet1),
        FILTER(Sheet1,Sheet1[employee]=EARLIER(Sheet1[employee])&&Sheet1[Week]=EARLIER(Sheet1[Week])))

 

With those columns you should be able to represent this in a chart and shoud look like this:

gadielsolis_0-1703784002653.pnggadielsolis_1-1703784011589.png

 

If I answered your question, please mark this thread as accepted

@gadielsolis  - Thank You for your response, please if possible can you share this pbix file.

 

Thanks,

Vishant

Sure, here you have the link so you can donwload the file https://drive.google.com/file/d/161ocw7Q-Pn7DKX567ono3aRFIgHf6Tki/view?usp=sharing

If I answered your question, please mark this thread as accepted

 

aj1973
Community Champion
Community Champion

Hi @toovishant 

Is this what you want to see?

aj1973_0-1703783743297.png

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.