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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
kongyuancn
Helper II
Helper II

Confusion about DateTime.[Date]

Hi All,

I'm confused about DateTime.[Date]

 

I have a small table:

let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMtU31jcyMDJUMDC0AiMFR1+lWJ1oJTN9U6iEkRUYwSTM9Q1hWoytwAiLjIkVGIFlYgE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [DateTime = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"DateTime", type datetime}})
in
#"Changed Type"

It looks like:

kongyuancn_0-1626760664799.png

In PowerBi I created an calculated column:

Date = [DateTime].[Date]
 
Now In PowerBi it created a column converting datetime to date:
kongyuancn_1-1626761035371.png

 

 I then created another table:
Table 2 = VALUES('Table'[Date])
kongyuancn_2-1626761114905.png

It looks good.

 

I then create another table:

Table 3 = VALUES('Table'[DateTime].[Date])
 
I thought Table 2 and Table 3 should be same. But I'm wrong:
kongyuancn_3-1626761260311.png

 

Can anyone help me to understand why?

2 REPLIES 2
Anonymous
Not applicable

IT's not wrong by any means. The hidden tables that underlie the date hierarchy feature (auto-datetime) have all dates regardless of what's in your tables. Hence you see a full list of consecutive dates when you use 'T'[Date].[Date]. It's all by design. However, I warn you that you should never - I mean NEVER - use the auto-generated dates. It'll sooner rather than later drive you crazy and will make you cry. Not to mention that this feature is there for the total newbies who don't know how to create good dimensional models.

 

Beware of the auto-generated date hierarchies. Instead, do it the right way: create a calendar on your own. You'll thank me later.

Preeti_Yadav
Resolver I
Resolver I

Hi @kongyuancn ,
You might try to change the data type from the above ribbon given in the report view,from the option data type.

It might help!!

 

Thanks !!

Preeti

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

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.