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 am not able to have a simple dateadd for weekend day calculation work. New to Power BI. Can someone help?
The event date is pretty much simple daily date. and The weending2 is the calculated date based on event date. Why the simple calculation won't work?
WeekEnding2 = FORMAT(DATEADD(datalake[last_event_date], (7 - (Weekday(datalake[last_event_date],2))), DAY), "YYYY-MM-DD")
Solved! Go to Solution.
hi @Anonymous
try this:
Weekending = datalake[last_event__date]+(7-WEEKDAY(datalake[last_event__date];2))
@Anonymous
I can’t find any no syntax issue in your formula. But there is some limitations of DATEADD. The second one below should be the reason why your calculation won’t work for some dates.
However you can get the expected results by creating a calculated column with following formula.
WeekEnding2 = FORMAT ( datalake[last_event_date] + ( 7 - WEEKDAY ( datalake[last_event_date], 2 ) ), "YYYY-MM-DD" )
Regards,
@Anonymous
I can’t find any no syntax issue in your formula. But there is some limitations of DATEADD. The second one below should be the reason why your calculation won’t work for some dates.
However you can get the expected results by creating a calculated column with following formula.
WeekEnding2 = FORMAT ( datalake[last_event_date] + ( 7 - WEEKDAY ( datalake[last_event_date], 2 ) ), "YYYY-MM-DD" )
Regards,
hi @Anonymous
try this:
Weekending = datalake[last_event__date]+(7-WEEKDAY(datalake[last_event__date];2))
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 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |