Error rate and Target - need to display Target number for latest week. only
Hi, I have results for Error rate and Target for last 12 weeks and in visualization Target numbers are interfering with the error rate in the graph above.
any way to project Target for only latest week from 12 weeks data and project the green line for 12 weeks ? so, it wont interfere with the error rate numbers. Splunk quire below.
index=equipment_error reporttype=p_scada description="No case found with the expected dimensions" OR description="Flight Path Occupied" OR description="Place Position Occupied" OR description="Tray pattern does not comply" AND mark_code=TPO earliest=-12w@w1 latest=-0@w1
| eval APAL=substr(isc_id,2,2)
| append
[| search index=internal_statistics_1h earliest=-12w@w1 latest=-0w@w1
[| inputlookup internal_statistics
| where report="Throughput" AND level="step" AND step="Pallet building" AND measurement IN("Case")
| fields id
| rename id AS statistic_id]
| eval value=coalesce(value,sum_value)
| fields statistic_id value group_name location
| eval _virtual_=if(isnull(virtual),"N","Y"),_cd_=replace(_cd, ".*:", "")
| sort 0 -_time _virtual_ -"_indextime" -_cd_
| dedup statistic_id _time group_name
| fields - _virtual_ _cd_
| lookup internal_statistics id AS statistic_id OUTPUTNEW report level step measurement
| eval location=substr(location,12) , location="CaseQty".location
| timechart span=1w@1 sum(value) BY location limit=0
| addtotals]
| timechart span=1w@1 count(isc_id) as ErrorQty sum(Total) as CaseQty values(mark_code) as mark_code
| eval ErrorRate=round((ErrorQty/CaseQty)*10000,1)
| fillnull value=0 | eval Target="5"
| table _time ErrorRate Target
| where ErrorRate>0.001
Appreciate help and Thanks in Advance
Instead of | eval Target="5" try this
| streamstats count as row
| eventstats max(row) as max
| eval Target=if(row=1 OR row=max,5,null())
| fields - row maxThen set the graph to connect when values are null