Hi Ku,
I understand you want to extract and view the average CPU and memory utilization for Azure VMs over a month
To enable monitoring in Azure and collect performance data, begin by creating a Log Analytics Workspace.
create Log Analytics workspaces and then fill in the necessary details Subscription, Resource Group, Workspace name, and Region. After entering these details Create to deploy the workspace.
Once the workspace is created, link your virtual machines to it. Go to the Virtual Machines section in the portal and select a VM you want to monitor and select Insights under the Monitoring section.
Run the log analytics workspace use the Kusto query to get CPU and memory usage after running the query you will get the data and export data to csv file
create the pivot table in excel, Filter and Summarize the Values
please refer this document:
https://learn.microsoft.com/en-us/azure/azure-monitor/metrics/analyze-metrics
If you have any further queries, let me know. If the information is helpful, please click on Upvote.
Thank you.