去年同期
本课属于 Coddy Power BI 学习旅程的“时间智能”单元。第 11 课,共 17 课。
SAMEPERIODLASTYEAR(Dates[Date]) 会将该行的日期往前移一年。
Revenue LY = CALCULATE([Revenue], SAMEPERIODLASTYEAR(Dates[Date]))2025 年 3 月显示的是 2024 年 3 月。2024 年的行为空白,因为没有 2023 年的数据。
挑战
简单编写 Revenue LY:一年前相同日期的收入。系统会逐年逐月进行检查。
亲手试试
报表数据模型
Revenue LY =| Year | Revenue LY |
|---|---|
| 2024 | |
| 2025 | |
| 总计 |
字段
- Sales
- Revenue
- Total Units
- Customers
- Products
- Stores
- Customers
- Dates
- Date
- Year
- Quarter
- Month
- MonthNumber
- Weekday
- Targets