This is the search: index="myindex" sourcetype="timesheets_json" OR sourcetype="tasks_json" work_order="$task_selector$" | stats values(username) as username values(time_spent) as time_spent values(time_estimate) as estimate values(work_order) as work_order values(list_name) as list_name values(task_name) values(status) as status by task_id | where ( status="complete" AND estimate>0) | eval time_perc_est=round((time_spent/estimate)*100), code=substr(list_name,1,9) | chart avg(time_perc_est) as "Actual vs Estimated Time (%)" by code username useother=f The data comes from 2 JSON indexes, one looks a bit like this: "timestamp": 1689067863, "id": "3578049312326190828", "task_id": "860r9v3p6", "username": "User1", "billable": false, "end": 1689067863, "start": 1689064497, "at": 1689067863, "space_id": "7032145", "list_name": "ABCDEF000 Company Name Pty Ltd", "task_name": "Clear Email", "due_date": 1689012000, "start_date": 1689012000, "date_created": 1688976115, "client_type": "Priority", "pt_support": "Someone", "pt": "Someone Else", "work_order": "Client Comms" And the other: "due_date": 1688666400, "start_date": 1688666400, "date_created": 1688545863, "date_done": 1688717285, "time_estimate": 300, "status": "complete", "time_spent": 458, "client_type": "Blah Blah", "pt_lead": "Someone", "pt": "Someone Else", "work_order": "Client Comms", "task_id": "860r9v3p6" I want to end up with something like this: Client User1 User2 User3 … ABCDEF000 25% 150% ABCDEF001 75% 300% … (Somewhat random colour coding there, but you get the idea). The number of columns, and names of the columns will change over time, obviously (and with different searches). The table is being generated, but I can't work out how to format the columns using the field name ("username"), instead of each column individually ("User1", "User2 etc) which requires a lot of copy/pasta, and ongoing manual maintenance every time a new person is onboarded.
... View more