Problem with keychain expression

Hi,

I am working on a report, and want to translate the original priority statements in alarming report ("Critical,High,Medium,Low").
I have tried the following in the table;

@priority=="Low"?"C":priority=="Medium"?"B":priority=="Critical"?"A":""@

This is resulting in that all result is set to "C" even though there are critical alarms in the list. Is there something wrong in my expression?

Best regards,
Freddy

EDIT :slight_smile:

I resolved this by myself. Tried a lot of ways, but the only way(so far) I got it to work was to compare the substring with a string, so my expression was like this ; "@substring(priority,0)=="Critical"?"A":substring(priority,0)=="Medium"?"B":substring(priority,0)=="Low"?"C"@"