Splunk Search

Why do these two searches return different results for page views?

pladamsplunk
Explorer

I've downloaded an application for web analytics, however on two separate dashboards it shows two difference values for "pageviews" which I would think should be consistent throughout the data. The two searches for page views are the following.

| tstats summariesonly=t max(Web.http_session_pageviews) FROM datamodel=Web WHERE Web.site="*" "Web.eventtype"=pageview GROUPBY Web.http_session

....this search produces the value 60,000

| tstats summariesonly=t count(Web.http_session_pageviews) FROM datamodel=Web WHERE Web.site="*" "Web.eventtype"=pageview GROUPBY Web.http_session

... this search produces the value 230,000

Can anyone help me understand the difference between these two searches and why they are returning different values (even though I believe they should be returning the same value since pageviews in the data is a constant value) ?

Tags (3)
0 Karma

sundareshr
Legend

The difference is between max and count. The first query is returning the max value in http_session_pageviews field, whereas the second query is returning the count of events.

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...