The command appears to be correct. I don't have any Azure suggestions, but I can look at it once:
Get-AzAdvisorRecommendation -Category Cost |
Where-Object {$_.ImpactedField -eq "Microsoft.Network/publicIPAddresses"}
It then offers me the appropriate advice. This seemed to work with:
"Microsoft.Compute/virtualMachines".