Screenshot attached for reference.
in the data shown in screenshot the multivalue fields are Lever, Leverplan , leveractual . I want to merge three fields into one and then used to calculate the savings from the percent in plan and actuallevers.
However when using mvzip for the three fields it ignores the last value in the mutlivalue field (automationskills) as it has values only in leverplan .
can you help how this can be tweaked ? how it can take all the multivalue fields and merge it ?
Code :
index=* | stats sum(Aamount) as Aamount sum(BAmount) as BAmount by Area empCode serial_id Lever leverplan leveractual
| makemv delim=";" Lever | makemv delim=";" leverplan | makemv delim=";" leveractual
| eval lever_with_Ratio=mvzip(mvzip(Lever ,leverplan ),leveractual)
| mvexpand lever_with_Ratio limit=0
| rex field=lever_with_Ratio"^(?[^,]+),(?[^,]+),(?.*)"
Area empCode serial_id Lever Aamount BAmount LeverPlan LeverActual
NA 12345678 1234 Name 168300 126225 0.1569 0.096
skills 0.0784 0.1004
hobbies 0.251 0.1674
relocation 0.1686 0.6362
automationskills 0.3451
↧