Forum Discussion
Help with Switch Error
- 2 years ago
I'm confused by the first sentence.
It looks to me that you want to treat it as a number, so it should be a number datatype. However, the error is caused by using two different types of comparison: one string comparison and one number comparison.
'Active Projects'[SchedNumDays] = ""
'Active Projects'[SchedNumDays] > 90--
I think if I was you I would convert the datatype to number and alter the switch statement to test for BLANK or null or whatever these empty values get converted to.
I'm confused by the first sentence.
It looks to me that you want to treat it as a number, so it should be a number datatype. However, the error is caused by using two different types of comparison: one string comparison and one number comparison.
'Active Projects'[SchedNumDays] = ""
'Active Projects'[SchedNumDays] > 90
--
I think if I was you I would convert the datatype to number and alter the switch statement to test for BLANK or null or whatever these empty values get converted to.
thank you! that worked, apologies on being confusing.