Hello @M, RAKESH ,
Thank you for reaching out to the Microsoft Q&A platform. Happy to answer your question. Please use the resource table in azure resource graph explorer when running the below query.
resources
| where type =~ 'Microsoft.Compute/virtualMachines'
| summarize count() by tostring(properties.storageProfile.osDisk.osType),tostring(properties.storageProfile.imageReference.offer), tostring(properties.storageProfile.imageReference.sku)
Reference : https://learn.microsoft.com/en-us/azure/governance/resource-graph/first-query-portal
Please "Accept as Answer" and Upvote if any of the above helped to help others in the community looking for remediation for similar issues.