Forum Discussion
Date Hierarchy in Direct Query
- 7 years ago
Hi iowakrz ,
Currently, the built-in date hierarchy is not yet available when using DirectQuery mode. You could click to upvote this idea or add your own comments.
As a workaround, you could create a custom date hierarchy manually. Please create [Year], [Quarter], [Month], [Day] columns first, right-click the original Date column and choose 'New Hierarchy', then, drag [Year], [Quarter], [Month], [Day] columns to place them under [Date] column.
Best regards,
Yuliana Gu
@Yuliana Gu, how do you go about creating the [Year], [Quarter], [Month] and [Day] column? I am new on DAX, so what I did is select the table, and select New Column and when I entered [Year], there is an error message, enclose entire name in brackets.
thanks.
Hi,
Year = Year(Calendar[Date])
Month Number = Month(Calendar[Date])
Month Name = FORMAT(Calendar[Date],"mmmm")
Day = Day(Calendar[Date])