Hi,
I am trying to convert some values with combination of Alphabets, Special Characters and numbers but still want to retain the property to be number so as to be able to sort on numeric values.
The below is an example -> 3.4M (0.00/0.00%)
I am able to do this using fieldformat command, if i use eval command then the numeric property of the field is not retained.
Now the problem is commands like fields, rename, table doesn't work. If any of these commands are used after fieldformat, then the field which was formatted using fieldformat becomes blank.
Can any one guide me, how to overcome this issue.
Note - It is not possible to use fields, rename, table commands before fieldformat in my search query. so need a work around to overcome this issue.
Update - Search Query
index = abc source="2016-09-12" | rename "Name" as Group | lookup parents Node as Group | eval parentsSplit=split(Parents,"|") | table "Group", parentsSplit, "Critical Count" | search parentsSplit="*_OS*" | rename "Critical Count" as new | join type=outer Group [search index = abc source="2016-09-05" | rename "Name" as Group | lookup parents Node as Group | eval parentsSplit=split(Parents,"|") | table "Group", parentsSplit, "Critical Count" | search parentsSplit="*_OS*" | rename "Critical Count" as old] | fillnull VALUE=0 | eval delta=new-old | eval delta_perc=if(old==0,round((delta/1)*100,2),round((delta/old)*100,2)) | eval delta_perc = if(abs(delta_perc)>1000000,round(delta_perc/1000000,1)."M",if(abs(delta_perc)>1000,round(delta_perc/1000,1)."K",delta_perc)) | fieldformat new=if((abs(new)>1000000),round(new/1000000,1)."M",if((abs(new)>1000),round(new/1000,1)."K",round(new,2)))." (".if ((abs(delta)>1000000),if(round(delta/1000000,0)>0,"+".round(delta/1000000,1)."M",round(delta/1000000,1)."M"),if((abs(delta)>1000),if(round(delta/1000,0)>0,"+".round(delta/1000,1)."K",round(delta/1000,1)."K"),if(round(delta,2)>0,"+".round(delta,2),round(delta,2))))."/".delta_perc."%)" |
The above query runs well and gives me the output i want, but once i add the below i get empty result
table Group, new | rename new AS "Val1"
So using table, rename command is not working after fieldformat command.
... View more