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
dyakoubek
New Member

No date hierarchy after group by.

After I do a group by and a table generated by group by my date column no has a hierarchy.

dyakoubek_0-1608661853051.png

LA_Grouped = GROUPBY(LA_Shifts_Grouped, LA_Shifts_Grouped[Driver], LA_Shifts_Grouped[Date], "Moves", MAXX(CURRENTGROUP(),LA_Shifts_Grouped[Moves]))
 
LA_Shifts_Grouped = GROUPBY('LA Shifts','LA Shifts'[Driver #],'LA Shifts'[Date],'LA Shifts'[Shift],"Moves",COUNTAX(CURRENTGROUP(), 'LA Shifts'[Driver #]))
 
 

 

1 ACCEPTED SOLUTION
v-yingjl
Community Support
Community Support

Hi @dyakoubek ,

If your table which is used in the GROUPBY() function has any relationship with any others tables in the report, the new table will not have the date hierarchy.

re.png1.png

 

Best Regards,
Community Support Team _ Yingjie Li
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-yingjl
Community Support
Community Support

Hi @dyakoubek ,

If your table which is used in the GROUPBY() function has any relationship with any others tables in the report, the new table will not have the date hierarchy.

re.png1.png

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

AllisonKennedy
Super User
Super User

@dyakoubek The built-in date hierarchy also disappears with relationships, but I always turn it off for my reports and use my own date table. It gives you more flexibility to create your own custom hierarchies exactly as you want.

Do you have a dating board? https://excelwithallison.blogspot.com/2020/04/dimdate-what-why-and-how.html

Here's how to create your own hierarchy: https://www.youtube.com/watch?v=1Y0T_KkeWyQ


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

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.