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 All,
I have two dates table. One is of Holiday list and aother is of request date.
I am looking for solution where the request date match with holiday dates so request date considered from next weekday.
Similarly if request assigned on weekend so request date next weekday.
Looking for help.
Thanks
@hasharma19 Maybe something like:
Column =
VAR __DateTime = [Requested Date & Time]
VAR __Date = DATE( YEAR(__DateTime), MONTH(__DateTime), DAY(__DateTime) )
VAR __Holidays = SELECTCOLUMNS( 'Holiday List', "Date", [Holiday Date] )
VAR __Calendar =
ADDCOLUMNS(
EXCEPT(
CALENDAR( __Date, __Date + 7 ),
__Holidays
),
"__WeekDay", WEEKDAY([Date], 2)
)
VAR __NextWorkDay = MINX( FILTER( __Calendar, [__WeekDay] < 6 ), [Date] )
VAR __Result = IF( WEEKDAY( __Date, 2 ) > 5 || __Date IN __Holidays, __NextWorkDay, __Date )
RETURN
__Result
@hasharma19 Umm... @ImkeF
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 |
---|---|
110 | |
94 | |
81 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |