Reporting

Leaderboard report

ianmaddox4bookr
Explorer

I'd like to build a leaderboard style report. I want to show the top 100 items in a list and have a column that shows the delta compared to this same time last week. Is there a plugin or some other report that makes this possible?

Tags (3)
0 Karma
1 Solution

martin_mueller
SplunkTrust
SplunkTrust

You could do this:

index=_internal earliest=-1w@d latest=@d | top source | join source [search index=_internal earliest=-2w@d latest=-1w@d | top source | rename count as previous_count percent as previous_percent] | eval delta = count - previous_count

Modify to fit your data and desired output.

View solution in original post

martin_mueller
SplunkTrust
SplunkTrust

You could do this:

index=_internal earliest=-1w@d latest=@d | top source | join source [search index=_internal earliest=-2w@d latest=-1w@d | top source | rename count as previous_count percent as previous_percent] | eval delta = count - previous_count

Modify to fit your data and desired output.

ianmaddox4bookr
Explorer

Thanks! That was definitely the right approach. I massaged it a bit to give a delta of rankings:

sourcetype=search earliest=-1d@d latest=@d | top search_query limit=100 | eval rank = 1 | accum rank | join search_query [search sourcetype=search earliest=-2d@d latest=-1d@d | top search_query limit=500 | eval prev_rank = 1 | accum prev_rank | rename count as prev_count percent as prev_percent] | eval delta = "+" . (prev_rank - rank) | replace "+-" with "-" in delta | replace "+0" with "--" in delta | table delta search_query count percent

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...