Value mappings problem when field values contain hyphen

Grafana 7 with table panel.
Field values in query result from influxdb are below, string type:
100202-007
100202-004
100202-002
100202-001
100201-009

I want to do value mapping with rules below:
100202-007 => Test2007
100202-004 => Test2004
100202-002 => Test2002
100202-001 => Test2001
100201-009 => Test1009

But what I got is
Test2007
Test2007
Test2007
Test2007
Test1009

It seems the contents after hyphen are ignored.
So is this a bug or how can I do it right?
Many thanks!

1 Like