The datastore PercentFree property from the VIProperty module generates a string, e.g. "20.12 %". This is difficult to compare. You better use the following definition that generates a number value.
New-VIProperty-NamePercentFree-ObjectTypeDatastore-Value { param($ds) 100*$ds.FreeSpaceMB/$ds.CapacityMB } -Force