SPLK-1001 Using Fields and Lookups Practice Question
A user has a search that produces a chart of error counts by host. They want to add a calculated field 'error_rate' as errors per million events. Which approach is correct?
⚠ Common exam trap
Splunk often tests the distinction between `eventstats` and `stats`, where candidates mistakenly use `stats` to compute a rate in a single step, not realizing that `stats` collapses events and prevents per-row calculations without a separate `eventstats` pass.
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
✓
Use eventstats to get total counts, then eval to compute rate, then chart
It uses `eventstats` to compute the total count of events per host across the entire result set, then `eval` to calculate the error rate as (error_count / total_count) * 1,000,000, and finally `chart` to display the results. This two-step approach ensures the total count is available for each row before the rate calculation, which is necessary because `chart` alone cannot reference a field computed in the same command.
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 eventstats to get total counts, then eval to compute rate, then chart
Why this is correct
eventstats adds aggregate counts to each event.
- ✗
Use chart eval(error_count/total_count) by host
Why it's wrong here
chart does not support eval within.
- ✗
Use stats to compute error_rate directly: stats avg(error_rate) by host
Why it's wrong here
error_rate field not defined yet.
- ✗
Use the lookup command to apply a calculated field
Why it's wrong here
lookup is for external data, not calculation.
Go deeper
Related to this question
About these practice questions
One of 502 original SPLK-1001 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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-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.