Thanks @isoutamo But my problem is if I use stats then that value isn't get dynamically passed to the macro. search index = index_name source = source_name | fields + bio, _time | stats earliest_time(_time) as eTime latest_time(_time) as lTime | eval Proj_Name = "my big project" | `my_Macro(Proj_name, eTime, lTime)` |table proj_value , proj_date In the above case the macro doesn't get invoked. However if I change something like below then the macro works and I get the desired result. search index = index_name source = source_name | fields + bio, _time | eval eTime=6735475120.999 |eval lTime=6542213344.976 | eval Proj_Name = "my big project" | `my_Macro(Proj_name, eTime, lTime)` |table proj_value , proj_date It works with eval statement But I cannot hard-code the earliest and latest time. It has to to be dynamic based on the latest_event time and earliest event time. In the macro eTime and lTime values gets passed as earliest and latest values of a dashboard URL, and the Macro outputs that URL along with few other values.
... View more