I want to create a stacked bar graph showing 2 columns stacked by department: 1 column is the total time and the second column is the total time-(time where status = pending)
REQUIRED = "Allocated Time" where "Allocation Interval Status" = APPROVED OR PENDING
CURRENT="Allocated Time" where "Allocation Interval Status" = APPROVED
These 2 columns should show as a stacked bar graph where the stacking is done by "Employee_s Department"
Try something like this
index=traffic_live | chart sum("Allocated Time") over "Employee_s Department" by "Allocation Interval Status" | eval REQUIRED=APPROVED+PENDING | rename APPROVED as CURRENT | table "Employee_s Department" REQUIRED CURRENT
Try something like this
index=traffic_live | chart sum("Allocated Time") over "Employee_s Department" by "Allocation Interval Status" | eval REQUIRED=APPROVED+PENDING | rename APPROVED as CURRENT | table "Employee_s Department" REQUIRED CURRENT
Thanks so much for your help, we took it from there and came up with this, which gave us what we wanted:
source="TrafficLiveAll.csv" | chart sum("Allocated Time") over "Employee_s Department" by "Allocation Interval Status" | eval REQUIRED=(APPROVED+PENDING)/480 | eval CURRENT=APPROVED/480 | table REQUIRED CURRENT | transpose | rename "row 1" as "Business Development", "row 2" as "Capacity", "row 3" as "Creative", "row 4" as "Data Consulting", "row 5" as "Development", "row 6" as "General", "row 7" as "Marketing", "row 8" as "Project Management", "row 9" as "Quality Assurance"