Forum Discussion
MKPartner
Helper II
10 months ago[Expression.Error] cannot convert null value to Logical
Hi Guys, I have two columns where both are without "null" values: PV_orig = ([orig_tot_fabric_assgn_qty]*[prod_cost])/4.84) and (([g1_metres]+[g0_metres]+[g2_metres]+[dk_metres]+[allow_me...
- 10 months ago
Hello,
I solved the issue with DAX function. It didn't work for me in Power Query.
Anonymous
10 months agoNot applicable
Hi there,
Perhaps you could wrap your DAX with another if statement to protect against nulls like this:
PV_LE = if (if [PV_real] = null then 0 else [PV_real])
>= (if [PV_orig] = null then 0 else [PV_orig])
then [PV_real]
else [PV_orig]
You could also find the max pretty neatly in Power Query using this M Code as a new Column:
PV_LE = List.Max({ [PV_real], [PV_orig] }) - Returns the maximum item in the list or the optional default value if the list is empty
Let me know if this helps!
Numa