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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Field is a date in the Power Query Editor, but no date hierarchy showing up in the Report View?

Hi community - I'm struggling to understand why Power BI isn't recognizing a field (AuditDate) as a Date hierarchy in the report view, yet is able to recognize the same field as a date in the Power Query Editor. As a comparision, I'm included similar screenshots of a field (d_calendar) which is being recognized both in the report view and PQE as a date:

 

Both are a Date data type in Power Query Editor:

ketchup_0-1643744980949.png

 

ketchup_1-1643744980951.png

 

Yet only one of these (DAY_DATE) is a date hierarchy in the Power BI report view:

 

ketchup_2-1643744980952.png

 

ketchup_3-1643744980954.png

 

I think this is causing me issues with utilizing DAY_DATE as the date in report view (dimensional modeling), even though the two tables are apparently linked in the data model:

ketchup_4-1643744980954.png

 

At a loss of what to try. D_CALENDAR is SQL Server data, while the AuditQuestionResponses is SharePoint data, for what it's worth. Any ideas?

1 ACCEPTED SOLUTION
bcdobbs
Super User
Super User

Hi,

The moment you create a relationship between two date fields the date field on the many side ( your audit date) becomes a foreign key. Power Bi then assumes you wish to disable the auto datetime table it normally creates in the background and use your own date table instead (D_Calendar) in this case.

 

This is generally a much a better way to go in terms of dimensional modelling. It does however mean that you need to create the date heirachy in your date table. The following link may get you started: Creating a simple date table in DAX - SQLBI


Alternatively if you delete the relationship the auto date hierarchy will return.



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

View solution in original post

2 REPLIES 2
bcdobbs
Super User
Super User

Hi,

The moment you create a relationship between two date fields the date field on the many side ( your audit date) becomes a foreign key. Power Bi then assumes you wish to disable the auto datetime table it normally creates in the background and use your own date table instead (D_Calendar) in this case.

 

This is generally a much a better way to go in terms of dimensional modelling. It does however mean that you need to create the date heirachy in your date table. The following link may get you started: Creating a simple date table in DAX - SQLBI


Alternatively if you delete the relationship the auto date hierarchy will return.



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Anonymous
Not applicable

Makes sense on disabling the auto datetime to use the date table instead - TIL, thanks!

 

The date heiarchy already exists in my date table (DAY_DATE), so it must be some other issue in my data that is causing blank visuals in my report. I'll go debug other items - appreciate it!

 

EDIT - after disabling the relationship, the audit date was in fact changed to a date heirarchy automatically. After that, I reenabled the relationship between the two tables and everything else worked correctly (slicing, etc.). Order of operations, or something. 👍

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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