I have CSV file contains below data. I am not able to sort the numeric data (with couple of string included) as desired.
Percentage
99.91
100
99.96
NoObjects
100
100
99.94
99.61
When I use the below commands, I am not able to get the Percentage column sorted in proper ascending/descending order.
$summarydata = Import-Csv summary.csv | Sort-Object {[int]$_.PercCompliance}
Currently above script, gives output as below.
I am aware about CSV file, will take string value. Is there any easy method to sort below sample data ?