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
Hi,
Year = Year(Calendar[Date])
Month Number = Month(Calendar[Date])
Month Name = FORMAT(Calendar[Date],"mmmm")
Day = Day(Calendar[Date])
Ashish_Mathur, when I entered, the error message is cannot find table 'calendar'. Am I suppose to enter as Year=Year (mytable[mystimestamp])? My timestamp format is for example: 12/3/2018 12:00:00 PM. Also, how do you create the Quarter?
- Ashish_Mathur7 years agoSuper User
Hi,
Yes. Try this calculated column fomula
Year=Year(mytable[mystimestamp])