Forum Discussion
rosamhernandez1
2 years agoHelper I
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...
- 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.
HotChilli
2 years agoCommunity Champion
Look at the values you are comparing in each case. Are they the same datatype or are they different datatypes?
- rosamhernandez12 years agoHelper I
both columns are Text data type