I think doing something like this would work. <base_search>
| lookup <lookup_name> UserID OUTPUT Attribute
| eval
attribute_regex=".*\-(\d+)\-.*",
max_attribute=...
See more...
I think doing something like this would work. <base_search>
| lookup <lookup_name> UserID OUTPUT Attribute
| eval
attribute_regex=".*\-(\d+)\-.*",
max_attribute=case(
isnull(Attribute), null(),
mvcount(Attribute)==1, max(tonumber(replace(Attribute, attribute_regex, "\1"))),
mvcount(Attribute)>1, max(mvmap(Attribute, tonumber(replace(Attribute, attribute_regex, "\1"))))
),
max_attribute_full=mvdedup(
case(
isnull(Attribute), null(),
mvcount(Attribute)==1, if(tonumber(replace(Attribute, attribute_regex, "\1"))=='max_attribute', 'Attribute', null()),
mvcount(Attribute)>1, mvmap(Attribute, if(tonumber(replace(Attribute, attribute_regex, "\1"))=='max_attribute', 'Attribute', null()))
)
) You can see in the screenshot below I used simulated data to do what I think you are asking for. The regex used in the replace command can be adjusted to fit the pattern that is stored in the Attribute field value to just grab the number.