Forum Discussion
CarlBlunck
Resolver I
4 years agoExpression.Error: We cannot convert the value "" to type List.
Hi community, I'm real new to powerBI and am getting this error in the following nested if statement: Nested if statement: = Table.AddColumn(#"Added Custom1", "Custom", each if [HRStreamDesc] ...
- Anonymous4 years ago
Hi CarlBlunck ,
Please try:
if [HRStreamDesc]<>"Nursing" then null else if List.ContainsAny( {[BaseClass]},{"AN","ANCSD"}) then "Assistant in Nursing" else nullBest Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
mussaenda
Community Champion
4 years agoHi CarlBlunck ,
Please try this
Table.AddColumn(#"Added Custom1", "Custom", each try if [HRStreamDesc] <> "Nursing" then null else
if List.ContainsAny([BaseClass],{"AN","ANCSD"}) then "Assistant in Nursing" else null otherwise null)CarlBlunck
Resolver I
4 years agoHi mussaenda thanks - but I unfortunately get a "Token Eof expected" error and the otherwise statement is being highlighted.
- CarlBlunck4 years ago
Resolver I
mussaenda ah I missed the inclusion of the each try if element. That got rid of the error but now everything is just coming back as a null...