How to fix Value Mapping doesn’t work

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 select table visualization.

Step 3 : In dashboard panel query (Code area) write the query to fetch data from database.

Step 4 : In right side dashboard panel configuration scroll down then click on Add field override.

Now follow these path:

Add field override > Fields with name >Choose the column(in my case result)

Now click on Add override property and then select Value Mapping

Step 5 :Now map the value and update it.

Note : Cell options → Cell type Colored text and Color scheme ->Single color(Black).

Final output

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