Forum Discussion
Anonymous
6 years agoNot applicable
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 "-" ...
- 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
Anonymous
6 years agoNot applicable
Hi Anonymous ,
I think the problem is that the "null" value is not list type, even you change it to "-", it's also a string type, not list type.
So you can't use the list.transform() function to it.
I think you need to do the if-else firstly, for example, just using:
if RCA is null then 0
else "your combine / list.transform() function
to do it.
Please try.
Aiolos Zhao
- Anonymous6 years agoNot applicable
Tried it but still same issue , output http://prntscr.com/qkoyuv
= if "RCA" is null then 0 else (Table.TransformColumns( #"Renamed Columns2", { { "RCA", each Combiner.CombineTextByDelimiter(" - ")( List.Transform( _ , each [value] ) ), type text } } ))