Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
When I use nested IFs in this manner, I keep seeming to get an error message. But it ends up outputting a value anyway, and the value seems to be correct. Although one time it just randomly stopped working on one chart, but then copy and pasting the expression from another chart made it work again. Can someone take a look at my expression and help me find out what is supposedly wrong with it?
=Sum(
If(Left(Item_Type, 1) = '2', 1,
If(Left(Item_Type, 1) = '4', 2,
If(Left(Item_Type, 1) = 'L', 2.25,
If(Left(Item_Type, 1) = 'M', 2.4, Null)
)
)
)
)
Basically I'm trying to convert text values to a corresponding numerical value based on the first character of the string.
Error is because of the NULL direct value , try like this
=Sum(
If(Left(Item_Type, 1) = '2', 1,
If(Left(Item_Type, 1) = '4', 2,
If(Left(Item_Type, 1) = 'L', 2.25,
If(Left(Item_Type, 1) = 'M', 2.4, Null())
)
)
)
)
Error is because of the NULL direct value , try like this
=Sum(
If(Left(Item_Type, 1) = '2', 1,
If(Left(Item_Type, 1) = '4', 2,
If(Left(Item_Type, 1) = 'L', 2.25,
If(Left(Item_Type, 1) = 'M', 2.4, Null())
)
)
)
)
Thanks for this @avinashelite !