=IF(AND(WEEKDAY(AA3,2)<5,(AA3-INT(AA3))<17/24),((INT(AA3)+1)+12/24),IF(AND(WEEKDAY(AA3,2)<5,(AA3-INT(AA3))>17/24),((INT(AA3)+2)+12/24),IF(WEEKDAY(AA3,2)=5,(INT(AA3)+4)+12/24,IF(WEEKDAY(AA3,2)=7,(INT(AA3)+2)+12/24,IF(WEEKDAY(AA3,2)=6,(INT(AA3)+3)+12/24,)))))
Я пытаюсь найти следующий рабочий день в зависимости от дня недели и часа дня. Вот то, что я преобразовал в DAX, но он не работает, и я понятия не имею, почему.
NBD =
IF (
AND (
WEEKDAY ( D2S[Actual Received Time], 2 <= 5 ),
HOUR ( D2S[Actual Received Time] ) < 14
),
(
INT ( D2S[Actual Received Time] ) + 23.99 / 24
),
IF (
AND (
WEEKDAY ( D2S[Actual Received Time], 2 ) = 5,
HOUR ( D2S[Actual Received Time] > 14 )
),
(
INT ( D2S[Actual Received Time] ) + 3 + 12 / 24
),
IF (
AND (
WEEKDAY ( D2S[Actual Received Time], 2 ) <= 5,
HOUR ( D2S[Actual Received Time] ) >= 14
),
INT ( D2S[Actual Received Time] ) + 1 + 12 / 24,
IF (
WEEKDAY ( D2S[Actual Received Time], 2 ) = 6,
INT ( D2S[Actual Received Time] ) + 2 + 12 / 24,
IF (
WEEKDAY ( D2S[Actual Received Time], 2 ) = 7,
INT ( D2S[Actual Received Time] ) + 1 + 12 / 24
)
)
)
)
)