Forum Discussion
Anonymous
4 years agoNot applicable
Error: We Cannot Convert a value of Type List to Type Text
Hi, I have an int column in my table that I am tryng to obtain the max of. I am using = List.Max(#"Added Custom1"[Count]) to obtain the max value, however I receive the following error. ...
Anonymous
3 years agoNot applicable
Hello,
please advise how to convert generated list of dates to list of text lines (to be further used in API calls);
direct application of Date.ToText function generate "Error: We Cannot Convert a value of Type List to Type Text"
let
start = #date(2023,1,1), end = Date.From( DateTime.LocalNow() ),
ListOfDays = List.Dates( start, Duration.Days(Duration.From(end - start)), #duration(1,0,0,0) )
in
ListOfDays
BA_Pete
3 years agoSuper User
Hi Anonymous ,
Try this as a new custom column/custom step:
List.Transform(
{ Number.From(#date(2023, 01, 01))..Number.From(Date.From(DateTime.LocalNow())) },
each Date.From(_)
)
...or this as a standalone query:
let
Source =
List.Transform(
{ Number.From(#date(2023, 01, 01))..Number.From(Date.From(DateTime.LocalNow())) },
each Date.From(_)
)
in
Source
In future, I would strongly recommend that you open a new topic on the forum with questions that you have.
Pete