SPLK-1002 Advanced Visualization and Lookups Practice Question
A user has created a dashboard panel using a 'chart' command with 'datacount by host'. The chart shows counts per host, but the hosts appear in alphabetical order. The user wants to sort the chart by count descending, so that the host with the most events appears first. The search is: index=main sourcetype=access | chart count by host. The dashboard is built using Simple XML. Which approach should be used to achieve the desired sorting?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Add '| sort -count' after the chart command in the search.
Adding '| sort -count' after the chart command sorts the results by count in descending order, making the host with the most events appear first. Option A is incorrect because the 'top' command produces a different table format (with count and percent fields) and is not appropriate if the desired output is a chart. Option B is incorrect because 'eventstats' adds a statistical field to events but does not replace the chart command or sort the results; it would require additional steps. Option D is incorrect because the Simple XML chart properties panel does not include a sorting option for chart data; sorting must be performed within the search itself.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use the 'top' command instead of 'chart' to automatically sort by count.
Why it's wrong here
top command outputs different structure than chart.
- ✗
Use 'eventstats' to compute counts and then sort by count.
Why it's wrong here
eventstats adds extra complexity without benefit.
- ✓
Add '| sort -count' after the chart command in the search.
Why this is correct
Sort after chart reorders the results.
- ✗
Use the chart properties panel in the dashboard editor to set sorting by count descending.
Why it's wrong here
Chart properties do not support sorting by count.
Go deeper
Related to this question
About these practice questions
Courseiva writes every SPLK-1002 question from scratch — 475 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This SPLK-1002 practice question is part of Courseiva's free Splunk certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SPLK-1002 exam.