Forum Discussion

spardadt's avatar
spardadt
Frequent Visitor
4 years ago
Solved

Switch Function not displaying correct result

Hello:
I've been trying to figure out what's wrong with my code for hours and cannot figure out. I'm trying to display a letter score based on the number score calculated from a measure. And for some reason, the corresponding letter to the score is wrong. It should be "D". It's a simple code but i really can't figure out what I'm doing wrong.
 

 

OTD Score = Switch (
TRUE(),
SupplierPerformance[OTD %] >= 90, "A",
SupplierPerformance[OTD %] >= 80 && SupplierPerformance[OTD %] < 90, "B",
SupplierPerformance[OTD %] >= 70 && SupplierPerformance[OTD %] < 80, "C",
SupplierPerformance[OTD %] >= 60 && SupplierPerformance[OTD %] < 70, "D",
SupplierPerformance[OTD %] < 60, "F",
"N/A"
)

 

2 Replies

    • spardadt's avatar
      spardadt
      Frequent Visitor

      Holy crap I feel so dumb overlooking that and pulling my hair out for hours trying to figure it out. Thank you very much.