Dashboards & Visualizations

Query to change the color to dashboard table panel values as per condition

Satheesh_red
Path Finder

Hi, 

The dashboard table panels contain 4 columns (Host,user,A,B). how to query it to do percentage of the values and if the below criteria are met and change the panel values with orange and red color if percentages are met by user and host.

if A > 80% of B, then color code A to Orange; if A > 90% of B, then color code to Red.

Satheesh_red_0-1689575395663.png

 

Regards,

Satheesh 

Labels (4)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi @Satheesh_red,

It's possible to define a colour range only for the values of one celle or column, in other words, if B chan have a value different than 100, you should add a new column calculating A/B and use colour range on this column.

Ciao.

Giuseppe

View solution in original post

gcusello
SplunkTrust
SplunkTrust

Hi @Satheesh_red,

you have to:

  • open your dashboard in Edit Mode
  • click on thepen icon in the column to highlight colours gcusello_0-1689578107637.png

     

  • Choose Colour and Ranges,
  • set the renges and the relative coluours you like for your values.

Ciao.

Giuseppe

0 Karma

Satheesh_red
Path Finder

thanks for the reply @gcusello 

Unfortunately, when I click on edit the dashboard, I don't see the option called color and ranges, this seems odd, but I'm not sure.

First, I have to make them % criterion and then moving on to color changing modes dependent on thresholds reached. 

 

Regards,

Satheesh 

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @Satheesh_red,

let me summarize:

  • you opened the Edit Mode gcusello_2-1689585927675.png,
  • you have a table panel,
  • you clicked on the pen (in the top right of the panel) gcusello_0-1689585815226.png,
  • You haven't the colour choice gcusello_1-1689585858446.png.

is it correct?

Ciao.

Giuseppe

 

0 Karma

Satheesh_red
Path Finder

your right @gcusello , Not able to see color option. 

Satheesh_red_0-1689590202659.png

 

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @Satheesh_red,

you're clicking on the wrong button, click on the pen in the column header, not the one on the top roght of the panel.

Ciao.

Giuseppe

Satheesh_red
Path Finder

thanks @gcusello  got it now, But i need to do the below check before i changed the values to color, any query reference. please help. 

if A > 80% of B, then color code A to Orange; if A > 90% of B, then color code to Red.

 

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @Satheesh_red,

considering that the B values are always 100, you could set the following ranges:

  • min to - 80 -> green
  • from 80 to 90 -> yellow
  • from 90 to max -> red

this is the code:

        <format type="color" field="Accessi">
          <colorPalette type="list">[#118832,#CBA700,#D41F1F]</colorPalette>
          <scale type="threshold">80,90</scale>
        </format>

Ciao.

Giuseppe

Satheesh_red
Path Finder

Hi @gcusello  

In my situation, B values are not 100; but, for clarity, I mentioned that values are 100.

So, basically, I'm going to compute the average and define the color ranges.

Please let me know if there is any way we can set it by query itself along with colors. 

 

Regards,

Satheesh 

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @Satheesh_red,

It's possible to define a colour range only for the values of one celle or column, in other words, if B chan have a value different than 100, you should add a new column calculating A/B and use colour range on this column.

Ciao.

Giuseppe

Get Updates on the Splunk Community!

New Dates, New City: Save the Date for .conf25!

Wake up, babe! New .conf25 dates AND location just dropped!! That's right, this year, .conf25 is taking place ...

Introduction to Splunk Observability Cloud - Building a Resilient Hybrid Cloud

Introduction to Splunk Observability Cloud - Building a Resilient Hybrid Cloud  In today’s fast-paced digital ...

Observability protocols to know about

Observability protocols define the specifications or formats for collecting, encoding, transporting, and ...