Forum Discussion

KatkaS's avatar
KatkaS
Post Patron
5 years ago
Solved

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!

 

  • Anonymous's avatar
    Anonymous
    5 years ago

    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

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    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

  • Anonymous's avatar
    Anonymous
    Not applicable

    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

    • KatkaS's avatar
      KatkaS
      Post Patron

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