Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
AlessandroBet
Helper V
Helper V

data format

Hi,

 

i have created a column with the following DAX command: 
Annual Days = CALENDAR(DATE(YEAR(TODAY()),1,1),DATE(YEAR(TODAY()),12,31))


but when i assign this column at the visual I can't see the data Hierarchy (Year, Quarter, Month) but only the single day
 
Immagine 2023-03-08 114545.png
 
I set the column as "Date"
 
Immagine 2023-03-08 114745.png
Cuodl you help me?
 
Many thanks
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @AlessandroBet ,

In Power BI Desktop, you select File > Options and settings > Options, and then select either the Global or Current File page. On either page, the option exists in the Time intelligence section.

vyangliumsft_0-1678699305466.png

There are also restrictions on date hierarchies:

  • The table storage mode is Import
  • The column data type is date or date/time
  • The column isn't the "many" side of a model relationship

Refer to:

Why there is no date hierarchy - Microsoft Power BI Community

 

There is also a workaround:

You can  create four calculated columns to extract the  "Year," "Quarter," "Month“,” Day " from column"Date".

Then you can manually create new Heirarchy, by right-clicking on the date, then drag in the other pieces you need ("Year," "Quarter," "Month“,” Day, ").

 

Year = YEAR('Annual Days'[Date])

Quarter = QUARTER('Annual Days'[Date])

Month = MONTH('Annual Days'[Date])

Day = DAY('Annual Days'[Date])

 

Click [Date] – Create hierarchy

vyangliumsft_1-1678699305468.png

Add four columns to the hierarchical results

[Day] – Add to hierarchy – Date Hierarchy.

 

vyangliumsft_0-1678699358437.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi  @AlessandroBet ,

In Power BI Desktop, you select File > Options and settings > Options, and then select either the Global or Current File page. On either page, the option exists in the Time intelligence section.

vyangliumsft_0-1678699305466.png

There are also restrictions on date hierarchies:

  • The table storage mode is Import
  • The column data type is date or date/time
  • The column isn't the "many" side of a model relationship

Refer to:

Why there is no date hierarchy - Microsoft Power BI Community

 

There is also a workaround:

You can  create four calculated columns to extract the  "Year," "Quarter," "Month“,” Day " from column"Date".

Then you can manually create new Heirarchy, by right-clicking on the date, then drag in the other pieces you need ("Year," "Quarter," "Month“,” Day, ").

 

Year = YEAR('Annual Days'[Date])

Quarter = QUARTER('Annual Days'[Date])

Month = MONTH('Annual Days'[Date])

Day = DAY('Annual Days'[Date])

 

Click [Date] – Create hierarchy

vyangliumsft_1-1678699305468.png

Add four columns to the hierarchical results

[Day] – Add to hierarchy – Date Hierarchy.

 

vyangliumsft_0-1678699358437.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Gowtham_Selvam
Resolver I
Resolver I

For date hierarchy you need to have a separate year and month column.Dax you written only show the date between that particular period what you have defined.

 

If I answered your question,kindly mark it as solution.

 

Thanks,

GS

Could you make an example?

Idrissshatila
Super User
Super User

Hello @AlessandroBet ,

 

Check this link to learn about creating date hierarchy inpower bi https://www.enjoysharepoint.com/power-bi-date-hierarchy/

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Follow me on Linkedin



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors