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.
Hi guys,
I need some help creating a list of items that are due tomorrow, excluding weekends and holidays.
This is what I have:
A list of items
Each item has a DueDate (none of them are in weekends or holidays)
A Date table with values "1" for working day and "0" for non-working day (weekends and holidays)
A relationship between DueDate and Date from my Date table.
So today, the list should show all due dates that are 14-01-2020. On Friday it needs to show all items that are due on the next Monday. What's the best way to do this?
Thanks!!
Solved! Go to Solution.
Hi @Anonymous
Try a column like that.
Column =
VAR __today = TODAY()
VAR __weekDay = WEEKDAY( __today, 2 )
RETURN
IF( __weekDay = 5, __today + 3 = 'Table'[DueDate], __today + 1 = 'Table'[DueDate] )
Just create a measure that subtracts the due date from TODAY(), or a calculated column if it does not need to be dynamic. You could throw an IF statement in there to check working day of TODAY. Then just filter to this measure = 1.
Hello Greg,
Thanks for your input. I created a column for Table[DueDate]-TODAY(), but when I filter on "1" wouldn't it still show DueDate = Saturday (which there are none of) when today is Friday?
Doesn't this work the same as the relative date filter showing the next 1 day, excluding today?
Hi @Anonymous
Try a column like that.
Column =
VAR __today = TODAY()
VAR __weekDay = WEEKDAY( __today, 2 )
RETURN
IF( __weekDay = 5, __today + 3 = 'Table'[DueDate], __today + 1 = 'Table'[DueDate] )
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
97 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |