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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
shekhar_shres
Advocate II
Advocate II

Date Table with only date column

Hi all,

When we create a Date table via blank query and invoke query with relevant start and end date we get a lot of dimensions for dates. 

I would like to create a date table with only Dates column. 

How can I achieve this. I tried playing with the m-script code we use to create dates table for this but it is not working. Any response will be highly regarded

Thank you

1 REPLY 1
TomMartens
Super User
Super User

Hey @shekhar_shres ,

 

I have to admit that I do not fully understand the challenge you are facing, as I miss an example of how your query does look like (the M code).
For this reason, the M script creates a simple table with a single column of data type "Date" called "Date":

let
    DateStart = #date(2021 , 1 , 1 )
    , DateEnd = #date(2021 , 12, 31 )
    , Source = List.Dates( DateStart , Number.From(DateEnd) - Number.From(DateStart) + 1 , #duration( 1 , 0 , 0 , 0 ) ),
    
    #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Renamed Columns" = Table.RenameColumns(#"Converted to Table",{{"Column1", "Date"}}),
    #"Changed Type" = Table.TransformColumnTypes(#"Renamed Columns",{{"Date", type date}})
in
    #"Changed Type"

As it is also a best practice do not forget to disable the creation of auto date/time tables in the options of the current file:

image.png

If you are not sure about this best practice, I recommend reading this article: Automatic time intelligence in Power BI - SQLBI

 

Hopefully, this helps to tackle your challenge.

 

Regards,
Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.

Top Solution Authors