Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
@jo123456 Here is a cleaned up version using SWITCH TRUE. Is the goal here to essentially implement a fiscal year flag where the fiscal year starts in September?
YearIndicator1 =
SWITCH( TRUE(),
'D-DATE'[CalendarYear] * 100 + 'D-DATE'[CalendarMonthNum] < (YEAR(TODAY())-1) * 100 + 9, "Before Previous Year",
'D-DATE'[CalendarYear] * 100 + 'D-DATE'[CalendarMonthNum] >=(YEAR(TODAY())-1) *100 + 9 && 'D-DATE'[CalendarYear] * 100 + 'D-DATE'[CalendarMonthNum] <= YEAR(TODAY()) * 100 + 8, "Previous Year",
'D-DATE'[CalendarYear] * 100 + 'D-DATE'[CalendarMonthNum] >= YEAR(TODAY()) * 100 + 9 && 'D-DATE'[CalendarYear] * 100 + 'D-DATE'[CalendarMonthNum] <= (YEAR(TODAY()) + 1) * 100 + 8, "Current Year",
'D-DATE'[CalendarYear] * 100 + 'D-DATE'[CalendarMonthNum] >= (YEAR(TODAY()) + 1) * 100 + 9 && 'D-DATE'[CalendarYear] * 100 + 'D-DATE'[CalendarMonthNum] <= (YEAR(TODAY()) + 2) * 100 + 8, "Next Year",
"Future Dates"
)
starts in september of the current year and always ends in august of the next year
@jo123456 Does seem possible that there should be an easier way to do this. One thing that would help greatly would be to use SWITCH( TRUE(), ... ) instead of the nested IF statements.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 8 | |
| 7 | |
| 7 |