Try the following
Perf
| where ObjectName == "LogicalDisk" and (CounterName == "Free Megabytes" or CounterName == "Disk Size (MB)")
| summarize
TotalDiskSpace_GB = maxif(CounterValue, CounterName == "Disk Size (MB)") / 1024,
Freespace_GB = maxif(CounterValue, CounterName == "Free Megabytes") / 1024,
UsedDiskSpace_GB = (maxif(CounterValue, CounterName == "Disk Size (MB)") - maxif(CounterValue, CounterName == "Free Megabytes")) / 1024
by Computer, InstanceName
| order by Computer, InstanceName asc
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin