This is pretty much exactly how I am doing it. The issue though is, when the % is present in the table, I can't perform evaluations on the fields. When I remove the %, it works great, but it doesn't have the % visually.
| stats count(tls_host) as tot_hosts,
count(eval(column_a_value == "Enabled")) as colum_a_tot,
count(eval(column_b_value == "Enabled")) as colum_b_tot
| eval perc_col_a = round((column_a_tot / tot_hosts)*100)."%"
| eval perc_col_b = round((column_b_tot / tot_hosts)*100)."%"
| rename perc_col_a as "Column A"
| rename perc_col_b as "Column B"
| convert num(perc_col_b)
fieldsummary, shows "Column A" as a string value, and "Column B" as an integer value.
Column A :: [{"value": "32%", "count" 131}]
Column B :: [{"value": "100","count:312}]
So essentially, any operations performed in the SPL generating the statistics table defines its type. The table evaluation is performed after the data has been provided.
There lays the problem. Adding the "%" will need to be done after the statistics table has been generated, or there needs to be a way to tell the dashboard treat the field as a numeric value instead of a string.
... View more