我试图在日期表中找到结束的一周,但是我意识到该公式在某些月份上给了我空白。
Week Ending on = CALCULATE(MIN([Date]),FILTER('Date',WEEKDAY([Date],2)=6 && [Date]>=EARLIER('Date'[Date])))
我使用下面的代码创建了一个日期表
Date =
ADDCOLUMNS (
CALENDAR (DATE (2024, 07, 1), DATE (2026, 4,31)),
"Year", YEAR([Date]),
"MonthNumber", MONTH([Date]),
"Quarter", QUARTER([Date])
)