XQL chart editor

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

XQL chart editor

L1 Bithead

Hi. just i'm little stuck...

 

config timeframe = 1y
|dataset= incidents
|filter (status in (ENUM.RESOLVED_FALSE_POSITIVE,RESOLVED_AUTO_RESOLVE))
|fields creation_time ,status
|alter month = format_timestamp("%m",creation_time )
|sort asc month
|comp count(status ) as total_auto_resolved_inc_month by month,status
| view graph type = column subtype = grouped xaxis = month yaxis = total_auto_resolved_inc_month

 

and i got this result> 

TNurmi_0-1740054064047.png

and i like to get two different line with same month. Now there is those two different status for same line...

1 accepted solution

Accepted Solutions

L5 Sessionator

Hello @T.Nurmi ,

 

This took a whole lot of effort to make the query. Please refer to below:

config timeframe = 1y
| dataset = incidents
| filter status in (ENUM.RESOLVED_FALSE_POSITIVE, ENUM.RESOLVED_AUTO_RESOLVE)
| fields creation_time, status
| alter month = format_timestamp("%Y-%m", creation_time) // Year-Month format
| alter false_positive_count = if(status = ENUM.RESOLVED_FALSE_POSITIVE, 1, 0)
| alter auto_resolve_count = if(status = ENUM.RESOLVED_AUTO_RESOLVE , 1, 0)
| comp sum(false_positive_count) as false_positive_total, sum(auto_resolve_count) as auto_resolve_total by month
| replacenull false_positive_total = 0, auto_resolve_total = 0
| sort desc month

| view graph type = column subtype = grouped show_callouts = `true` xaxis = month yaxis = false_positive_total,auto_resolve_total seriescolor("false_positive_total","#ff0000") seriescolor("auto_resolve_total","#0000ff") xaxistitle = "Month" yaxistitle = "Number of Incidents" seriestitle("false_positive_total","Resolved False Positives") seriestitle("auto_resolve_total","Auto Resolved Incidents")

If you feel this has answered your query, please let us know by clicking like and on "mark this as a Solution". Thank you. 

Ashutosh Patil

View solution in original post

1 REPLY 1

L5 Sessionator

Hello @T.Nurmi ,

 

This took a whole lot of effort to make the query. Please refer to below:

config timeframe = 1y
| dataset = incidents
| filter status in (ENUM.RESOLVED_FALSE_POSITIVE, ENUM.RESOLVED_AUTO_RESOLVE)
| fields creation_time, status
| alter month = format_timestamp("%Y-%m", creation_time) // Year-Month format
| alter false_positive_count = if(status = ENUM.RESOLVED_FALSE_POSITIVE, 1, 0)
| alter auto_resolve_count = if(status = ENUM.RESOLVED_AUTO_RESOLVE , 1, 0)
| comp sum(false_positive_count) as false_positive_total, sum(auto_resolve_count) as auto_resolve_total by month
| replacenull false_positive_total = 0, auto_resolve_total = 0
| sort desc month

| view graph type = column subtype = grouped show_callouts = `true` xaxis = month yaxis = false_positive_total,auto_resolve_total seriescolor("false_positive_total","#ff0000") seriescolor("auto_resolve_total","#0000ff") xaxistitle = "Month" yaxistitle = "Number of Incidents" seriestitle("false_positive_total","Resolved False Positives") seriestitle("auto_resolve_total","Auto Resolved Incidents")

If you feel this has answered your query, please let us know by clicking like and on "mark this as a Solution". Thank you. 

Ashutosh Patil
  • 1 accepted solution
  • 396 Views
  • 1 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!