Dashboards & Visualizations

Why is the sort function not saving properly in dashboard panels?

twmoffit
Explorer

Hello,

I am having an issue where I want to sort my data in a chart but for some reason when I save and close the dashboard, my sort removed a " " (space) from the search. Here is an example,

I save the search as this and the largest 10 items return in my visualization:

....
| chart sum(FREE_GB) sum(USED_GB) over TS_NAME
| sort 10 -num("sum(USED_GB)")

However, when I save and then close or refresh the dashboard, ALL of the sorts on the dashboard change to this:

....
| chart sum(FREE_GB) sum(USED_GB) over TS_NAME
| sort 10-num("sum(USED_GB)")

Notice the space has been removed between "10 -num(..."

How do I stop this from happening? Is this just a bug in Splunk or is there something wrong with my syntax??
Thanks,

0 Karma

jplumsdaine22
Influencer

This is a bug, fixed in 6.5.4 (see discussion here: https://answers.splunk.com/answers/547674/splunk-bug-fields-command.html)

See SPL-140551, SPL-140828, SPL-140807 in fixed issues here: http://docs.splunk.com/Documentation/Splunk/6.5.4/ReleaseNotes/6.5.4

After upgrading I recommend you run the following command so you can identify any affected dashboards and fix them on the filesystem.

find $SPLUNK_HOME/etc/users $SPLUNK_HOME/etc/apps -type f -name '*.xml' -exec grep -lr 'sort-\|fields-' {} +

niketn
Legend

@twmoffit, we had noticed this issue with Internet Explorer (IE), however, the same worked fine with Chrome. Can you try that?

This seemed like a bug with IE.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

twmoffit
Explorer

Changing and saving the search in Chrome seemed to have fixed the problem for now. I hope this gets patched at some point soon though.

0 Karma

niketn
Legend

@twmoffit, did you check out, @jplumsdaine22 's answer that this bug has already been fixed in 6.5.4. If you are using 6.5.4 or later and still observe the issue you should report the same to Splunk Support through your Entitlement. Kindly upvote if this work-around has helped.

Also if you can upgrade to 6.5.4 or later then test and accept jplumsdaine22's answer.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

jplumsdaine22
Influencer

It has been patched (see below) However you will need to manually fix affected boards.

somesoni2
Revered Legend

Can you try like this?

....
 | chart sum(FREE_GB) as sum_FREE_GB sum(USED_GB) as sum_USED_GB by TS_NAME
 | sort 10 -num(sum_USED_GB)

OR just

....
 | chart sum(FREE_GB) as sum_FREE_GB sum(USED_GB) as sum_USED_GB by TS_NAME
 | sort 10 -sum_USED_GB
0 Karma

rjthibod
Champion

What version of Splunk are you running and what browser?

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Index This | What travels the world but is also stuck in place?

April 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...