How to trim some part of selected data from InfluxDB in Grafana

I have below data in grafana, coming from influxDB.

Data in InfluxDB :

enter image description here

I am using Influx DB 1.7 with Grafana. When i display above data in Grafana the Client Names are coming with () like Res1(4234), Res2(4254)… But i want to display Client Names in Grafana as Res1, Res2 like below.

Grafana Table :

enter image description here

I am writing grafana sql query as below.

Select Code,id,Client_Name,Policy from xtable

How can i trim (4234) paranthesis with numbers from Client_Names in Grafana sql.

@ivbtar use regex-based value mappings like this:

Thanks alot my friend.

One more question. Can we apply this value mapping also to variables in filters? Client_Name variable in filters also come with (4234) paranthesis.

If you can see it inside the table panel, you should be able to modify it. I don’t think value-mapping extends into in the inner workings of template variables, but I’m not sure :+1:

at some point it might be more useful to fix these sorts of issues on the database side, just to make life easier in Grafana. That is, if you can

You are right. But the data is influxdb. I have 10.000 s of data like this. InfluxDB does not allow to update added records.It is a time series db. Do you know Influxdb ? Is it possbile to clean these pharanthesis () in Influxdb database side?