@VolginRnB Indeed. You can use the split() function in KQL to split the string column by a specified delimiter and then extract and extend the desired parts into separate columns.
For example, calling the split() function on a string like
/subscriptions/mySubscriptionId/resourcegroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM
would return:
["","subscriptions","mySubscriptionId","resourcegroups","myResourceGroup","providers","Microsoft.Compute","virtualMachines","myVM"]
You can then extend the ResourceGroup and ResourceName using the extend operator shown as under:
For your use case, a query like the following should help:
SecurityRecommendation
| project AssessedResourceId
| extend SplitAll=split(AssessedResourceId, '/')
| extend ResourceGroup=SplitAll[4], VMName=SplitAll[-1]
| project-away SplitAll, AssessedResourceId //optional
Feel free to modify this as required. Also check the parse operator in KQL for other regex options for parsing string expressions.
Hope this helps. Do let us know if you have further questions.