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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Chandu_G
New Member

Date Hierarchy in Direct Query

I noticed that the date hierarchy feature is not available for DirectQuery. This feature is incredibly useful, as it allows for the consolidation of metrics based on the hierarchy, such as by month or year. This capability is particularly beneficial for forecasting, as it enables us to make projections based on different time intervals within the hierarchy.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Chandu_G 

 

You are correct that, traditionally, the date hierarchy feature is not available in DirectQuery mode in Microsoft Power BI. The reason for this limitation is because DirectQuery mode is designed to query data directly from the underlying data source in real-time, rather than importing and processing the data within the Power BI model.

vzhengdxumsft_2-1724220386758.png

 

However, you can still achieve similar functionality by creating a date table and using DAX to create a custom date hierarchy within your DirectQuery model by using the "Enter Data" feature or by using Power Query to generate a date table that spans the necessary range of dates.

Or using calculated table to create a calendar table with Dax.


Then you can create a relationship between the calendar table and the DirectQuery mode table, then you can use the date hierarchy feature.

 

Best Regards

Zhengdong Xu
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

1 REPLY 1
Anonymous
Not applicable

Hi @Chandu_G 

 

You are correct that, traditionally, the date hierarchy feature is not available in DirectQuery mode in Microsoft Power BI. The reason for this limitation is because DirectQuery mode is designed to query data directly from the underlying data source in real-time, rather than importing and processing the data within the Power BI model.

vzhengdxumsft_2-1724220386758.png

 

However, you can still achieve similar functionality by creating a date table and using DAX to create a custom date hierarchy within your DirectQuery model by using the "Enter Data" feature or by using Power Query to generate a date table that spans the necessary range of dates.

Or using calculated table to create a calendar table with Dax.


Then you can create a relationship between the calendar table and the DirectQuery mode table, then you can use the date hierarchy feature.

 

Best Regards

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.