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
KatkaS
Post Patron
Post Patron

Exclude week-ends

Hello,

I have a calculated column as per below measure ( Job Req open time in days - it calculates how many days a requisiton is open).

I would need to exclude week-ends out of this.

 

Could you please help how?

Thank you!

 

exclude week-ends.png

1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi @KatkaS ,

First, please create a Date dimension table. Then update the formula of calculated column "Job Req open time in days" as below to exclude weekends:

 

Job Req open time in days =
IF (
    'HRLink Recruitment Report'[Time from request to hire] > 0,
    'HRLink Recruitment Report'[Time from request to hire],
    CALCULATE (
        COUNTROWS ( 'Date' ),
        FILTER ( 'Date', WEEKDAY ( 'Date'[Date], 2 ) < 6 ),
        DATESBETWEEN (
            'Date'[Date],
            'HRLink Recruitment Report'[Date Created],
            TODAY ()
        )
    )
)

 

Best Regards

Rena

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

5 REPLIES 5
v-yiruan-msft
Community Support
Community Support

Hi @KatkaS ,

Whether your problem has been resolved? If yes, could you please mark the helpful post as Answered? It will help other members in the community find the solution easily if they face the similar problem with you. Thank you.

Best Regards

Rena

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

Thank you so much to all of you!!!!

v-yiruan-msft
Community Support
Community Support

Hi @KatkaS ,

First, please create a Date dimension table. Then update the formula of calculated column "Job Req open time in days" as below to exclude weekends:

 

Job Req open time in days =
IF (
    'HRLink Recruitment Report'[Time from request to hire] > 0,
    'HRLink Recruitment Report'[Time from request to hire],
    CALCULATE (
        COUNTROWS ( 'Date' ),
        FILTER ( 'Date', WEEKDAY ( 'Date'[Date], 2 ) < 6 ),
        DATESBETWEEN (
            'Date'[Date],
            'HRLink Recruitment Report'[Date Created],
            TODAY ()
        )
    )
)

 

Best Regards

Rena

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

@KatkaS - Net Work Days - https://community.powerbi.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/367362#M109


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
amitchandak
Super User
Super User

@KatkaS , for the work day calculation. You might need help from Date table.

 

Refer to my file on the second page. There is an example of date diff and workday diff

https://www.dropbox.com/s/y47ah38sr157l7t/Order_delivery_date_diff.pbix?dl=0

 

 

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.