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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Anonymous
Not applicable

Direct Query | Datetime columns don't have hierarchy

Hello everyone,

 

I'm creating a dashboard using a direct query from a sql server view.

 

Problem:

I have several columns (datetime) and PowerBI recognizes them as so but it doesn't show the icon as a "date field" and I can't create a hierarchy based on month and year for example.

 

Thanks for your feedback !   

1 ACCEPTED SOLUTION
v-lionel-msft
Community Support
Community Support

Hi @Anonymous ,

 

Regarding the cause of this problem, you can refer to this:

xx1.PNG

Modeling limitations 

 

But you can create hierarchical dates manually.

First, creating [Year], [Quarter], [Month], [Day]  calculated column. ( You need to use YEAR(), QUARTER(), MONTH(), DAY() function)

Second, select the three points to the right of the column.

iii8.PNGiii7.PNG

 

Best regards,
Lionel Chen

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

3 REPLIES 3
v-lionel-msft
Community Support
Community Support

Hi @Anonymous ,

 

Regarding the cause of this problem, you can refer to this:

xx1.PNG

Modeling limitations 

 

But you can create hierarchical dates manually.

First, creating [Year], [Quarter], [Month], [Day]  calculated column. ( You need to use YEAR(), QUARTER(), MONTH(), DAY() function)

Second, select the three points to the right of the column.

iii8.PNGiii7.PNG

 

Best regards,
Lionel Chen

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

amitchandak
Super User
Super User

You can bring your own time dimension, that would be better. Refer: https://community.powerbi.com/t5/Community-Blog/Decoding-Direct-Query-in-Power-BI-Part-1-Time-Intell...

 

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
rajendraongole1
Super User
Super User

Try to manually with custom date like  [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.

 

hope it helps.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.