Forum Discussion

rosamhernandez1's avatar
2 years ago
Solved

Help with Switch Error

Working on getting a traffic light set up, have a column set up to determine the date difference between two dates. Now need to convert that number into a color, this is what I had set up but getting...
  • HotChilli's avatar
    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.