I got the answer for my previous question here : https://community.splunk.com/t5/Splunk-Search/Join-searches-and-make-a-calculation/m-p/545615#M15458...
Here is my current search
<search A>
| bin span=1d _time
| stats count max(size) AS Users_Waiting by _time
| append [search <search B>
| bin span=1d _time
| stats count as Daily_Users by _time
| streamstats sum(Daily_Users) as Cumulative_Users ]
| stats values(*) as * by _time
| eval Users_Not_Waiting = Cumulative_Users - Users_Waiting
| timechart span=1d Users_Not_Waiting
The issue that I am having is the following:
Search A - Has events for the last 9 days so I can get Users_Waiting data
Search B - Doesnt have events for the last 2 days so I dont get any data
Because Search B doesnt have events for the last 2 days, when I do the eval, I am not able to difference for the last 2 days.
I want Search B (which is cumulative data) to continue to show 3765156 so the diff is calculated.
You can add the filldown command to your search to propagate the last Cumlative_Users value before calculating Users_Not_Waiting:
| filldown Cumulative_Users
| eval Users_Not_Waiting = Cumulative_Users - Users_Waiting
You can add the filldown command to your search to propagate the last Cumlative_Users value before calculating Users_Not_Waiting:
| filldown Cumulative_Users
| eval Users_Not_Waiting = Cumulative_Users - Users_Waiting