Using the built-in Power BI date table, you are able to drill down from year -> Qtr -> month effortlessly, as shown below:
The date table used to generate the drill-down figure above:
DAX Formula: Cal = CALENDAR(MIN(Data[Date]),MAX(Data[Date]))
I would like to maintain this drill-down capability for the following custom date table:
Dates =
GENERATE (
CALENDAR ( DATE ( 2016, 10, 1 ), DATE ( 2025, 10, 1 ) ),
VAR currentDay = [Date]
VAR year =
IF ( MONTH ( currentDay ) >= 10, YEAR ( currentDay ) + 1, YEAR ( currentDay ) )
VAR quarter =
IF (
MONTH ( currentDay ) >= 10,
1,
IF ( MONTH ( currentDay ) <= 3, 2, IF ( MONTH ( currentDay ) <= 6, 3, 4 ) )
)
VAR month =
IF (
MONTH ( currentDay ) >= 10,
MONTH ( currentDay ) - 9,
MONTH ( currentDay ) + 3
)
RETURN
ROW ( "year", year, "quarter", quarter, "month", month )
)
It seems that the moment I mark "Dates" as the date table, I am unable to implement the built-in drill-down capability. I tried adding a date hierarchy, but cannot seem to control the order of the drill-down. For example, the visuals display month initially, and then "drill-down" to year, and finally to quarter. (this order doesn't make sense to me and I can't seem to change it). I need to be able to go from year -> quarter -> month, as before. I cannot use the default date table because I am using fiscal dates.
This is the result I am getting:
Please let me know if anything needs clarification, thank you!