Splunk Search

Create a triple stacked bar chart that has one column per day

SimonR2018
New Member

Hello All,

I am having difficulty in creating a triple stacked bar chart that has is displayed per day for time series

I have 3 fields in accountDetails.channel consisting of 'iPhone, web, android' i.e
ANDROID 63
IPHONE 232
WEB 45

and what I want is to create a single column with each of these fields and values per day and then create a time series for the columns values for the previous X days

spath event | search event="account:create:account:success"|dedup accountDetails.accountId | bin _time span=1d as day | convert timeformat="%Y-%m-%d" ctime(day) AS MYDay | chart count AS MYDAY by accountDetails.channel

unfortunately while i can create a single bar with the total number of accounts created I can not stack the bar per X days

Tags (1)
0 Karma
1 Solution

renjith_nair
Legend

@SimonR2018,

Try

spath event | search event="account:create:account:success"|dedup accountDetails.accountId 
| bin _time span=1d as day | convert timeformat="%Y-%m-%d" ctime(day) AS MYDay 
| chart count  over MYDay by accountDetails.channel
Happy Splunking!

View solution in original post

0 Karma

renjith_nair
Legend

@SimonR2018,

Try

spath event | search event="account:create:account:success"|dedup accountDetails.accountId 
| bin _time span=1d as day | convert timeformat="%Y-%m-%d" ctime(day) AS MYDay 
| chart count  over MYDay by accountDetails.channel
Happy Splunking!
0 Karma

SimonR2018
New Member

Thank you very much, working as requested

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...