Splunk Search

Sales of each weekday by week number for month of December

rajakabdual
New Member

hi i need the December month sales by week number , given below i am sharing my index name and other fileds name also.

index= sales sourcetype=csv source= sales_new.csv and fields are date_month ,date_wday,Sales

Tags (1)
0 Karma
1 Solution

p_gurav
Champion

You can use :

 index= sales sourcetype=csv source= sales_new.csv date_month=december | timechart  span=1w count | eval day=strftime(_time,"%d") | eval week_number=floor(day/7)+1

View solution in original post

0 Karma

p_gurav
Champion

You can use :

 index= sales sourcetype=csv source= sales_new.csv date_month=december | timechart  span=1w count | eval day=strftime(_time,"%d") | eval week_number=floor(day/7)+1
0 Karma

rajakabdual
New Member

Hi P_gurav, thank you for the grate help its working fine and i am looking for the same.

0 Karma

deepashri_123
Motivator

Hey rajakbdual,

Can u try something like this:
index=sales sourcetype=csv source=sales_new.csv date_month=december | timechart span=1w Sales

Let me know if this helps!!

0 Karma

rajakabdual
New Member

Hey deepashri,
sorry i am getting the error at |timechart span=1w Sales

0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...