Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
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?
Solved! Go to Solution.
@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.
@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.
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.
| User | Count |
|---|---|
| 22 | |
| 22 | |
| 20 | |
| 19 | |
| 11 |
| User | Count |
|---|---|
| 66 | |
| 56 | |
| 46 | |
| 44 | |
| 31 |