Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Cannot convert value null to type List

I have a data set in table as below :            The RCA field has the values coming from an API in the form of records as below which i want to show as a single record separated by "-" ...
  • v-lili6-msft's avatar
    6 years ago

    hi Anonymous 

    You could try this simple way as below:

    Just add a steps that replace error with null (or other value).

     

    or just nested it in your formula as below:

     

    =Table.ReplaceErrorValues( Table.TransformColumns(
        #"Renamed Columns2",
        {
          {
            "RCA", 
            each Combiner.CombineTextByDelimiter(" - ")(
    	  List.Transform( _ , each if _ = null or _ = "" then 0 else [value] ) 
            ),
    	type text
          }
        }
      ) , {{"RCA", null}})

     

     

    Regards,

    Lin