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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
srutt
Advocate I
Advocate I

Power Query Table.ToList format not converting to date

I'm trying to convert a table of dates to a list (using Table.ToList), but I get an error that states it cannot convert the dates to a text.  How can I convert the table and keep the date format?

 

 

1 ACCEPTED SOLUTION
pqian
Microsoft Employee
Microsoft Employee

@srutt Why do you need the list of dates?

 

In any case, you can simply right click the table column's header and select "Drill Into", that should give you the column as a list. FYI, drilling into table columns yields a list, drilling into table rows yields a record.

View solution in original post

3 REPLIES 3
pqian
Microsoft Employee
Microsoft Employee

@srutt Why do you need the list of dates?

 

In any case, you can simply right click the table column's header and select "Drill Into", that should give you the column as a list. FYI, drilling into table columns yields a list, drilling into table rows yields a record.

Thanks, I figured it something easy that I was missing. 

 

On your question, I needed the list to create a custom function that works like NetworkDays but also excludes certain holidays. 

srutt
Advocate I
Advocate I

let
    Source = Sql.Database("xxx", "db"),
    dbo_tblHolidaySchedule = Source{[Schema="dbo",Item="tblHolidaySchedule"]}[Data],
    ChangedType = Table.TransformColumnTypes(dbo_tblHolidaySchedule,{{"HolidayDate", type date}}),
    RemovedOtherColumns = Table.SelectColumns(ChangedType,{"HolidayDate"})
in
    Table.ToList(RemovedOtherColumns)

Here's the code.

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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