EDIT: The below search suddenly did work, so my issue is solved!
So I have two searches in a dashobard, but resulting in a number:
| tstats count AS "Count" from datamodel=my_first-datamodel (nodename = node.name.1) summariesonly=t prestats=true | stats dedup_splitvals=t count AS "Count"
| tstats count AS "Count2" from datamodel=my_second_datamodel where (nodename = node.name.2) summariesonly=t prestats=true | stats dedup_splitvals=t count AS "Count2"
Now I want to calculate with those results. I want to find out what percentage the first search is of the second. I have found other threads but they didn't work, the best I could come up with was this:
| tstats count AS "Count" from datamodel=my_first-datamodel (nodename = node.name.1) summariesonly=t prestats=true | stats dedup_splitvals=t count AS "Count"
| appendcols
[| tstats count AS "Count2" from datamodel=my_second_datamodel (nodename = node.name.2) summariesonly=t prestats=true | stats dedup_splitvals=t count AS "Count2"
]
| eval Perc=round((Count/Count2)*100,2)
Does anyone know? Thanks in advance!
... View more