You need to do it like this:
eventtype=RAS AND (EventCode=20272) AND ConnectionID!="NA" AND UserID="XYZ"
| dedup ConnectionID
| bucket _time span=1mon@mon
| stats sum(Data_Sent) as Monthly_Total_Sent stdev(Data_Sent) as Monthly_Sent_Stdev by _time UserID
| eval 'Monthly_Avg_Sent(MB)'=round(Monthly_Avg_Sent/(1024*1024),2), 'Monthly_Sent_Stdev(MB)'=round(Monthly_Sent_Stdev/(1024*1024),1),'Abnormal_Sent_Limit(MB)'= 2 * 'Monthly_Sent_Stdev(MB)' + 'Monthly_Avg_Sent(MB)'
As a general rule, its a good idea to keep your field names very simple. and then just rename to proper names at the very end. That way you don't need to worry about single quoting fields.
... View more