It sounds like you want appendcol or append command.
http://docs.splunk.com/Documentation/Splunk/6.2.4/SearchReference/Appendcols
Hi ben_leung,
maybe this can help, since you're only counting the events from two different searches try to create an eventtype http://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Defineeventtypes for each search and tag them for example:
index=main "string" field1
will be eventtype one with tag=one
index=main sourcetype=certain_logs action=certain_action field2
will be eventtype two with tag=two
Once created, run a search like this:
tag=one OR tag=two | timechart count by tag
Hope this helps ...
cheers, MuS
Try something like this
index=main "string" OR (sourcetype=certain_logs action=certain_action) | eval commonfield=if(action=certain_action,field_2,field_1) | timechart count by commonfield