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.
I want to create new column at the "DataTable".
If the Startdate is in Holiday, I want to create a new column by converting it to the day the holiday ended.
Solved! Go to Solution.
@ChoiJunghoon - Perhaps:
Applied Holiday =
VAR __Date = DATE(YEAR([StartTime]),MONTH([StartTime]),DAY([StartTime]))
VAR __Remark = LOOKUPVALUE('CalendarTable'[Remark],[Date],__Date)
RETURN
IF(__Remark <> "Holiday",__Date,
MINX(FILTER('CalendarTable',[Date]>__Date && [Remark] <> "Holiday"),[Date])
)
@ChoiJunghoon - Perhaps:
Applied Holiday =
VAR __Date = DATE(YEAR([StartTime]),MONTH([StartTime]),DAY([StartTime]))
VAR __Remark = LOOKUPVALUE('CalendarTable'[Remark],[Date],__Date)
RETURN
IF(__Remark <> "Holiday",__Date,
MINX(FILTER('CalendarTable',[Date]>__Date && [Remark] <> "Holiday"),[Date])
)
Thank you So much
Hi,
That download link does not work.
so instead of FIRSTNONBLANK() you are looking for "first blank" holiday column value for a given datetime value
- Take your datetime value
- convert it to a date
- in the dates table find the MIN(date) that is greater than or equal to the date in step 2 where the holiday column is blank
You can do this via Calculate() or Minx()
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 |
---|---|
111 | |
94 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |