Hi @Simona11 You could try: | timechart span=1d latest("TOTAL DAILY BAGS") as daily_bags, count as total_alarms
|stats sum(total_alarms) as total_alarms, sum(daily_bags) as total_bags | makeresults count=8
| streamstats count as row
| eval AREA=case(row=1,"1111", row=2,"1111", row=3,"1222", row=4,"1323", row=5,"1323", row=6,"1222", row=7,"1111", row=8,"1323")
| eval "ALARM DESCRIPTION"=case(row=1,"TRIGGER", row=2,"TRIGGER", row=3,"FAILURE", row=4,"FAILURE", row=5,"HAC", row=6,"FAILURE", row=7,"FAILURE", row=8,"TRIGGER")
| eval "TOTAL DAILY BAGS"=case(row<=5,18600, row>5,33444)
| eval TIME=case(row<=5,"2024-03-01", row>5,"2024-02-01")
| eval _time=strptime(TIME,"%Y-%m-%d")
| timechart span=1d latest("TOTAL DAILY BAGS") as daily_bags, count as total_alarms
| stats sum(total_alarms) as total_alarms, sum(daily_bags) as total_bags 🌟 Did this answer help you? If so, please consider: Adding karma to show it was useful Marking it as the solution if it resolved your issue Commenting if you need any clarification Your feedback encourages the volunteers in this community to continue contributing
... View more