# Value Mapping doesn’t work

**URL:** <https://community.grafana.com/t/value-mapping-doesn-t-work/108347>\
**Category:** Dashboards\
**Tags:** value-mapping, dashboard\
**Created:** [November 22, 2023, 3:05pm UTC](https://community.grafana.com/t/value-mapping-doesn-t-work/108347 "2023-11-22T15:05:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![michalkret](https://avatars.discourse-cdn.com/v4/letter/m/ad7895/32.png) [@michalkret](https://community.grafana.com/u/michalkret)\
**Post date:** [November 22, 2023, 3:05pm UTC](https://community.grafana.com/t/value-mapping-doesn-t-work/108347/1 "2023-11-22T15:05:19Z")

</div>

- What Grafana version and what operating system are you using?

Grafana v10.1.5, hosted locally on linux machine.

- **What** are you trying to achieve?

Light up cells in a table visualization panel with red coloured text when their value is equal to “FAIL”.

- **How** are you trying to achieve it?

I added the following rule in value mappings:

 ![image](https://us1.discourse-cdn.com/grafana/original/3X/3/8/38da5c062076372337d7634470554972850f00a3.png)

I tried to do the same for specific column using Override, but it didn’t work either.

- What happened?

Nothing.

- What did you **expect** to happen?

Text changes colour.

- Can you copy/paste the configuration(s) that you are having problems with?

SQL query:

```sql
            SELECT
                execution_time,
                build,
                result,
-- some more fields
            FROM
                metadata
            WHERE
-- some filters            
            ORDER BY
                execution_time DESC;

```

Mappings defined as:

```json
          "mappings": [
            {
              "options": {
                "FAIL": {
                  "color": "dark-red",
                  "index": 0,
                  "text": "failing"
                },
                "PASS": {
                  "color": "dark-green",
                  "index": 1,
                  "text": "passed!"
                }
              },
              "type": "value"
            }
          ],

```

- Did you receive any errors in the Grafana UI or in related logs? If so, please tell us **exactly** what they were.

No errors.

---

<div class="post-metadata">

**Author:** ![michalkret](https://avatars.discourse-cdn.com/v4/letter/m/ad7895/32.png) [@michalkret](https://community.grafana.com/u/michalkret)\
**Post date:** [November 23, 2023, 4:01pm UTC](https://community.grafana.com/t/value-mapping-doesn-t-work/108347/3 "2023-11-23T16:01:46Z")

</div>

Shame to admit but I had an override for one of the columns that I overlooked.  
What I also forgot to add was Cell type override, see:

![image](https://us1.discourse-cdn.com/grafana/original/3X/e/b/ebb750f78e88d06ef31c0db36bf238489b08c7fc.png)

I guess one sometimes needs fresh eyes and right question asked by another person:)  
Thanks for you help!

---

<div class="post-metadata">

**Author:** ![infofcc3](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/infofcc3/32/51248_2.png) [@infofcc3](https://community.grafana.com/u/infofcc3)\
**Post date:** [January 6, 2025, 12:40pm UTC](https://community.grafana.com/t/value-mapping-doesn-t-work/108347/4 "2025-01-06T12:40:28Z")

</div>

you can follow our detailed documentation for fix this problem

> [@How to fix Value Mapping doesn’t work](https://community.grafana.com/t/how-to-fix-value-mapping-doesn-t-work/139649):
>
> Problem statement : Cells in a Grafana table visualization are not displaying red-colored text for the value “FAIL” despite applying value mappings and column-specific overrides. The expected background color change is not occurring, and the configuration seems ineffective. Step to Light up cells in a table visualization panel with red coloured text when their value is equal to “FAIL”. Step 1: Create table in postgreSQL using these query Step 2 : Create new dashboard in grafana and …

---

<div class="post-metadata">

**Author:** ![infofcc3](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/infofcc3/32/51248_2.png) [@infofcc3](https://community.grafana.com/u/infofcc3)\
**Post date:** [February 1, 2025, 6:09am UTC](https://community.grafana.com/t/value-mapping-doesn-t-work/108347/5 "2025-02-01T06:09:47Z")

</div>

Hy , just wanted to check, does my solution work for you, or are you still facing same issues Please contact me if you need any help, I will be happy to help you here.
