Forum Discussion
Automatic grouping by dates
Hello,
I'm new to Power BI.
I looking for a reason why Power BI dose not create automatic grouping by dates.
I have dates formated as date and when I am draging "date" into axis it do not give me grouping by quaters, months.
Data are taken from SQL server.
I would like to ask you for advise with this.
Hi Anonymous ,
I suggest to create caculated columns as below and add them as a hierarchy manually to work around.
Year = YEAR('Product'[SalesDate])Q = "Q" &QUARTER('Product'[SalesDate])Month = MONTH('Product'[SalesDate])day = DAY('Product'[SalesDate])
4 Replies
- Greg_DecklerCommunity ChampionImport or direct query? Do you have the automatic hierarchy creation turned off in Options and settings?
- AnonymousNot applicable
I can see not that I have been asking google wrong question.:)
I found that date hierarchy is not avaliable with DirectQuery.
Regards
Starylass
- amitchandakSuper User
If the column is identified as date it will create date hierarchy in import mode
or refer:
https://community.powerbi.com/t5/Desktop/Date-Hierarchy-Not-Available/td-p/490683
https://community.powerbi.com/t5/Desktop/Date-Hierarchy-Doesn-t-show/td-p/525460
- v-frfei-msftCommunity Support
Hi Anonymous ,
I suggest to create caculated columns as below and add them as a hierarchy manually to work around.
Year = YEAR('Product'[SalesDate])Q = "Q" &QUARTER('Product'[SalesDate])Month = MONTH('Product'[SalesDate])day = DAY('Product'[SalesDate])