Hi, I wonder whether someone may be able to help me please.
I'm running the query below which works fine.
index=main auditSource="iht" auditType=Questionnaire "detail.version"=1 | rename detail.activity AS activity, detail.easytouse AS select, detail.nino AS nino | eval activity=if(activity=="","Not filled",activity) | makemv allowempty=true delim="," activity| mvexpand activity | eval activity = case(activity ==1, "Register", activity==2, "Provide asset information", activity==3, "Provide gift information", activity==4, "Provide debt information", activity==5, "Provide exemption information", activity==6, "Increase Threshold", activity==7, "Check estate report", activity==8, "Declare and submit application", activity==9,"Request clearance", 1=1, activity) | eval select = case(select ==1, "Very easy", select==2,"Easy",select==3,"Neither easy nor difficult",select=4,"Difficult",select==5,"Very difficult",select=="","Not filled") | rex field=nino mode=sed "s/(\S{1})\S{1}/\1X/g" | stats list(activity) as activityList, values(select) as selectList, values(generatedAt) as timeList by nino, generatedAt| fields nino, timeList, activityList, selectList| sort nino, timeList
But what I'm trying to do is now group this by the nino field.
I've tried changing the final two pipes with this:
| stats count by nino | fields nino, timeList, activityList, selectList
But the problem is, is that although I can see the nino values, all the other fields are blank i.e. timeList, activityList, selectList
I just wondered whether someone may be able to tell me where I've gone wrong please.
Many thanks and kind regards
Chris
... View more