Dashboards & Visualizations

Bar values in Descending order of each month

harish_ka
Communicator

I have a report which shows top 3 errors by month,error. i am trying to plot this on a bar chart (used chart not timechart), now the bar chart displays the bar with errors count but not in error count order.

Any option to sort the bar based on error count??

Report Looks like this:

Month---Er1--Er2 --Er3

Jan --- 10 ----5 ----7
Feb--- 12----18----4

So i want my bar chart looks like below,

Jan---Er1--Er3--Er2 (Error bars based on counts)
Feb--- Er2--Er1--Er3

Thanks in Advance..

0 Karma

woodcock
Esteemed Legend

Given that you are using this:

 | stats count AS ErrorCount BY Error Date | sort Date -count | dedup 3 Date | chart values(ErrorCount) AS count BY Date Error

You need to change -count to -ErrorCount like this:

 | stats count AS ErrorCount BY Error Date | sort Date -ErroCount | dedup 3 Date | chart values(ErrorCount) AS count BY Date Error
0 Karma

harish_ka
Communicator

Yes, And when i convert to Bar Chart, the bars should be in ascending/descending order of error count.
How can i sort this??

Now the bars are sorted in ascending order of Error, i want it to be sorted by error count, bar with max error count should show first..

0 Karma

woodcock
Esteemed Legend

Again, as with your other question, there is no way to do this in Simple XML. So your options are to create your own custom Modular Visualization or file an Enhancement Request P0 support case.

0 Karma

woodcock
Esteemed Legend

Do show your search and preferably some Statistics tab data.

0 Karma

harish_ka
Communicator

My search looks like below,
search ... | stats count as ErrorCount by Error,Date|sort Date,-count|dedup 3 Date|chart values(ErrorCount ) as count by Date,Error

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...