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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Datediff .[date] function suggestion

Hello,

 

When I'm typing the datediff function, after I enter the first date, a suggestion to use the.[date] function appears. Why does this suggestion appear, does anyone know? Is it needed in a particular case? I don't apply it because it seems redundant to me, but I don't know if I'm missing some kind of good pratice step here.

 

Thanks for you help.

 

 

Picture2.png

1 ACCEPTED SOLUTION

@Anonymous , When you mark a date table as date, the date you choose will not have that. The date you join with the date of date table might not have the hierarchy too

 

These are the reasons Date Hierarchy can be missing
https://community.powerbi.com/t5/Desktop/Date-Hierarchy-Doesn-t-show/td-p/525460
https://community.powerbi.com/t5/Desktop/Date-hierarchy-not-available/td-p/438804
https://community.powerbi.com/t5/Desktop/Lost-Missing-Date-Hierarchy/td-p/421045

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , I usually prefer not to use .date. There many reasons you can lose the default date hierarchy.

I think if you have only date with no time. No need to worry about that. Also in case of timestamp in date, it should give the correct answer

 

You use this to create new column or use this calculation

date(year([datetime]),month([datetime]),day([datetime]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Sorry, I did not understand the "There many reasons you can lose the default date hierarchy." part.

 

 

@Anonymous , When you mark a date table as date, the date you choose will not have that. The date you join with the date of date table might not have the hierarchy too

 

These are the reasons Date Hierarchy can be missing
https://community.powerbi.com/t5/Desktop/Date-Hierarchy-Doesn-t-show/td-p/525460
https://community.powerbi.com/t5/Desktop/Date-hierarchy-not-available/td-p/438804
https://community.powerbi.com/t5/Desktop/Lost-Missing-Date-Hierarchy/td-p/421045

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Users online (27)