Splunk Search

Can we name the addcoltotals field in a bar chart?

vrmandadi
Builder

I ran this search:

.....| chart  count by TYPE | addcoltotals labelfield=total 

and got these results:

type    count     total
a         2
b         2
c         2          
          6       total

I visualized the above result in a bar chart, but the total field does not have any name to it like a or b or c .....is there any way that the bar chart can have a name called total?

0 Karma
1 Solution

ngatchasandra
Builder

Hi vrmandadi,

Try with fillnull command to have a name for it like follow in your bar graph

 .....| chart  count by TYPE | addcoltotals labelfield=total |fillnull value=TOTAL

Or you can try:

.....| chart  count by TYPE | addcoltotals labelfield=TYPE label=total

View solution in original post

Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...