sql-bi / DaxDateTemplate

Power BI template to create a Date table in DAX
MIT License
265 stars 76 forks source link

Working days no holidays #69

Closed luzms closed 2 years ago

luzms commented 2 years ago

Hi Marco, I love your Date DAX table, but I need to calculate working days without holidays. Can you please help me modify the working days line? your help is much appreciated.

marcosqlbi commented 2 years ago

Just change this line:

        VAR IsWorkingDay =
            CONTAINS ( WorkingDays, [WorkingDayNumber], WEEKDAY ( CalDate, 1 ) - 1 )
                && ISBLANK ( [Holiday Name] )

to:

        VAR IsWorkingDay =
            CONTAINS ( WorkingDays, [WorkingDayNumber], WEEKDAY ( CalDate, 1 ) - 1 )
luzms commented 2 years ago

Thanks Marco!!! You rock! I love your calendar

Get Outlook for iOShttps://aka.ms/o0ukef


From: Marco Russo @.> Sent: Wednesday, May 4, 2022 3:47:30 AM To: sql-bi/DaxDateTemplate @.> Cc: Luz @.>; Author @.> Subject: Re: [sql-bi/DaxDateTemplate] Working days no holidays (Issue #69)

Just change this line:

    VAR IsWorkingDay =
        CONTAINS ( WorkingDays, [WorkingDayNumber], WEEKDAY ( CalDate, 1 ) - 1 )
            && ISBLANK ( [Holiday Name] )

to:

    VAR IsWorkingDay =
        CONTAINS ( WorkingDays, [WorkingDayNumber], WEEKDAY ( CalDate, 1 ) - 1 )

— Reply to this email directly, view it on GitHubhttps://github.com/sql-bi/DaxDateTemplate/issues/69#issuecomment-1117019904, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APDYMMOZCQXQAQ6IE5VEZKDVIITRFANCNFSM5VAIAR4A. You are receiving this because you authored the thread.Message ID: @.***>