how to get this ' floor(weekend (today())))' in DAX
top of page
Um zu sehen wie dies funktioniert, öffne deine veröffentlichte Website.
how to get this '
floor(weekend (today())))' in DAX
how to get this '
floor(weekend (today())))' in DAX
1 Kommentar
Your Answer (1)
bottom of page
WeekendCheck =
VAR CurrentDay = WEEKDAY(TODAY(), 2) -- This starts the week on Monday (1) and ends on Sunday (7)
RETURN
IF(CurrentDay = 6 || CurrentDay = 7, 1, 0) -- Return 1 for Saturday or Sunday, otherwise 0
This formula will return 1 if today is a weekend (Saturday or Sunday) and 0 otherwise.