cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dilipprasad
Frequent Visitor

Custome Colum cannot convert a value of type List to type Text.

Hi,

I am new to Power BI and I am trying to add a custom column and the details are as below. I am getting an error as below, kindly help me here.

Expression.Error: We cannot convert a value of type List to type Text.
Details:
Value=[List]
Type=[Type]

 

Custom_ExpectedFulfilmentTime
= Table.AddColumn(#"Removed Columns", "Custom", each if(#"Actionable Demands"[Service Line Input] = null)
then #"Actionable Demands"[#"Allocation ETA/DOJ"]

else if(Text.Contains(#"Actionable Demands"[Service Line Input] , "internal", Comparer.OrdinalIgnoreCase))
then Date.ToText(Date.From(DateTime.LocalNow()),"MM/dd/yyyy")

else if(Text.Contains(#"Actionable Demands"[Service Line Input] , "extension", Comparer.OrdinalIgnoreCase))
then Date.ToText(Date.From(DateTime.LocalNow()),"MM/dd/yyyy")
else "TBD")

1 ACCEPTED SOLUTION
bcdobbs
Super User
Super User

Hi,

 

A few things:

  • Your if statements are referring to #"Actionable Demands". That is a precious step which is a list of values. If needs a column which looks like [ColumnName].
  • the syntax for if doesn't use brackets in power query. It should just be:

if condition then output else output



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

View solution in original post

2 REPLIES 2
dilipprasad
Frequent Visitor

Thank you i have removed #"Actionable Demands" as you said

bcdobbs
Super User
Super User

Hi,

 

A few things:

  • Your if statements are referring to #"Actionable Demands". That is a precious step which is a list of values. If needs a column which looks like [ColumnName].
  • the syntax for if doesn't use brackets in power query. It should just be:

if condition then output else output



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors
Top Kudoed Authors