I am trying to obtain the DailyTransactions and WeeklyTranscations . The following is my Query ->
index=INDEXA sourcetype=*XYZ* earliest=-7d@d latest=@d "service=randomservice"
| stats first(_time) as _time, values(A), values(B), values(C), values(D), values(ProductType) AS ProductType, values(E) AS Decision by productId
| search (ProductType=ProductTypeA OR ProductType=ProductTypeB OR ProductType=ProductTypeC OR ProductType=ProductTypeD)
| stats values(count) as WeeklyTransactions by ProductType Decision
| appendcols
[search index=INDEXA sourcetype=*XYZ* earliest=-1d@d latest=@d "service=randomservice"
| stats first(_time) as _time, values(A), values(B), values(C), values(D), values(ProductType) AS ProductType, values(E) AS Decision by productId
| search (ProductType=ProductTypeA OR ProductType=ProductTypeB OR ProductType=ProductTypeC OR ProductType=ProductTypeD)
| stats count as DailyTransactions by ProductType Decision ]
This is the result i am expecting to see ->
ProductType Decision WeeklyTransactions DailyTransactions
ProductTypeA Decision1 10 3
ProductTypeA Decision2 25 0
ProductTypeB Decision2 13 4
ProductTypeC Decision3 85 20
This is the result i'm obtaining on running my query ->
ProductType Decision WeeklyTransactions DailyTransactions
ProductTypeA Decision1 10 3
ProductTypeA Decision2 25 4
ProductTypeB Decision2 13 20
ProductTypeC Decision3 85
... View more