Dashboards & Visualizations

How to plot a bar chart for each customer's status for timeframe?

venky1544
Builder

2022-02-23 11:02:55 Cust=A1,txn_num=12,txn_status=success
2022-02-23 11:02:55 Cust=A1,txn_num=7,txn_status=failed
2022-02-23 11:02:55 Cust=A1,txn_num=18,txn_status=awaiting
2022-02-23 11:04:55 Cust=A2,txn_num=13,txn_status=success
2022-02-23 11:04:55 Cust=A2,txn_num=18,txn_status=failed
2022-02-23 11:04:55 Cust=A2,txn_num=26,txn_status=awaiting
2022-02-23 11:06:55 Cust=A3,txn_num=12,txn_status=success
2022-02-23 11:06:55 Cust=A3,txn_num=7,txn_status=failed
2022-02-23 11:06:55 Cust=A3,txn_num=18,txn_status=awaiting
2022-02-23 11:15:55 Cust=A4,txn_num=13,txn_status=success
2022-02-23 11:15:55 Cust=A4,txn_num=18,txn_status=failed
2022-02-23 11:15:55 Cust=A4,txn_num=26,txn_status=awaiting
2022-02-23 11:25:55 Cust=A5,txn_num=12,txn_status=success
2022-02-23 11:25:55 Cust=A5,txn_num=7,txn_status=failed
2022-02-23 11:25:55 Cust=A5,txn_num=18,txn_status=awaiting
2022-02-23 11:30:55 Cust=A6,txn_num=13,txn_status=success
2022-02-23 11:30:55 Cust=A6,txn_num=18,txn_status=failed
2022-02-23 11:30:55 Cust=A6,txn_num=18,txn_status=awaiting

 

what im trying to achieve is to create a bar chart for each cust i need the status for the timeframe

i would the divide the cust by trellis but for each cust i can't get the bar height based on txn_num and split by status  something like below 

venky1544_0-1645697774826.png

 

Labels (3)
0 Karma

somesoni2
Revered Legend

Try something like this (Replace everything before "| chart" command with your current search which extracts fields "Cust", "txn_num", and "txn_status")

|makeresults | eval temp="2022-02-23 11:02:55 Cust=A1,txn_num=12,txn_status=success#2022-02-23 11:02:55 Cust=A1,txn_num=7,txn_status=failed#2022-02-23 11:02:55 Cust=A1,txn_num=18,txn_status=awaiting#2022-02-23 11:04:55 Cust=A2,txn_num=13,txn_status=success#2022-02-23 11:04:55 Cust=A2,txn_num=18,txn_status=failed#2022-02-23 11:04:55 Cust=A2,txn_num=26,txn_status=awaiting#2022-02-23 11:06:55 Cust=A3,txn_num=12,txn_status=success#2022-02-23 11:06:55 Cust=A3,txn_num=7,txn_status=failed#2022-02-23 11:06:55 Cust=A3,txn_num=18,txn_status=awaiting#2022-02-23 11:15:55 Cust=A4,txn_num=13,txn_status=success#2022-02-23 11:15:55 Cust=A4,txn_num=18,txn_status=failed#2022-02-23 11:15:55 Cust=A4,txn_num=26,txn_status=awaiting#2022-02-23 11:25:55 Cust=A5,txn_num=12,txn_status=success#2022-02-23 11:25:55 Cust=A5,txn_num=7,txn_status=failed#2022-02-23 11:25:55 Cust=A5,txn_num=18,txn_status=awaiting#2022-02-23 11:30:55 Cust=A6,txn_num=13,txn_status=success#2022-02-23 11:30:55 Cust=A6,txn_num=18,txn_status=failed#2022-02-23 11:30:55 Cust=A6,txn_num=18,txn_status=awaiting" | table temp | makemv temp delim="#" | mvexpand temp | rename temp as _raw | extract 
| chart values(txn_num) by Cust txn_status
0 Karma

venky1544
Builder

somesoni2 Thank you for the revert 

what i need is a timestamp in the x-axis if you check my screenshot in the query for each client showing the status with count of txn_num for each status in a span of 5 min

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

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...