Courseiva
Creating Reports, Dashboards and VisualizationshardMultiple ChoiceObjective-mapped

SPLK-1001 Practice Question: Creating Reports, Dashboards and Visualizations

Exhibit

Refer to the exhibit.

```
index=web sourcetype=access_combined
| stats count by status
| eval status_category = case(status>=200 AND status<300, "2xx", status>=300 AND status<400, "3xx", status>=400 AND status<500, "4xx", status>=500, "5xx")
| stats count by status_category
```

Refer to the exhibit. The search is expected to produce a count of HTTP status codes grouped into categories. However, the results show a column 'status' instead of 'status_category'. What is the problem?

⚠ Common exam trap

Splunk often tests the order-of-operations pitfall where candidates assume `eval` can create a new field from a field that exists before `stats`, forgetting that `stats` transforms the data structure and only retains specified fields.

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

The first 'stats count by status' is unnecessary; the eval should be applied first, then stats.

The search pipeline first uses `stats count by status`, which consumes the raw `status` field and outputs only the `status` and `count` fields. The subsequent `eval` command then tries to create `status_category` from `status`, but `status` still exists after the first `stats` (it is the group-by field). The real issue is that the `eval` should be placed before the first `stats` so that the categorization happens on the raw `status` values, and then `stats count by status_category` can aggregate by the new field. The first `stats` is unnecessary and disrupts the intended flow.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The first 'stats count by status' is unnecessary; the eval should be applied first, then stats.

    Why this is correct

    Applying stats before eval loses the original status values for categorization, resulting in incorrect grouping.

  • The eval command references a field 'status' that does not exist after the first stats.

    Why it's wrong here

    After first stats, the field 'status' exists as the grouping field.

  • The second stats command should be 'stats count by status'.

    Why it's wrong here

    That would not group by category.

  • The eval command should use 'if' instead of 'case'.

    Why it's wrong here

    Both if and case are valid; case is appropriate here.

About these practice questions

Courseiva writes every SPLK-1001 question from scratch — 502 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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This SPLK-1001 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-1001 exam.