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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Number of Working Days Able to Filter by Month

Hi,

 

I have created calculated columns to give me the number of working days since the "first entry" that an employee entered data into the system.

 

My calculated column calculates the number of days from the first date of entry, to todays date, and counts the number of week days between those two dates.

 

Is there a way to create a measure that allows me to filter the days by month?

So if I select March, the measure will search for the first date of entry in March by that employee, and subtract that date from todays date to get the accurate number of working days up until todays date?

 

Please let me know if this question does not make sense...

 

Thank you!
Sarh

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @jdbuchanan71 and @amitchandak ,

 

I was able to find the number of working days, but was wondering if I could filter the number of working days by month, so if I use a filter in the dashboard, the nubmer of working days would also filter

 

Thank you!
Sarah

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous , you can create a working day column in your calendar and that to sum up .

 

work day = if(weekday([date],2)<6,1,0)

Anonymous
Not applicable

Hi @jdbuchanan71 and @amitchandak ,

 

I was able to find the number of working days, but was wondering if I could filter the number of working days by month, so if I use a filter in the dashboard, the nubmer of working days would also filter

 

Thank you!
Sarah

@Anonymous 

You can but you have to do it using a calendar table and an isWorkingDay type of column then you do the sum against the caledar table and apply the filters from the calendar table.

 

jdbuchanan71
Super User
Super User

@Anonymous 

Take a look at this article that talks about calculating working days.  You will need a calendar table in your model.

https://www.sqlbi.com/articles/counting-working-days-in-dax/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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