Hi,
I have a csv file as shown below. I need to create an output csv file which will have only those TESTIDs where the COUNT(UFMID) >100. I am using the following code and I am running into issues. Also there are some characters in the csv file which seems to be the issue.
COUNT(UFMID)||' | '||PLAZAID |
$Results = @() foreach ($P in $POSFile -as [Int]) { $PL = $P.COUNTUFMID; $LN = $P.TESTID; Import-Csv 'C:\TESTReport.csv' | Where-Object {[int]$_.COUNTUFMID -gt 100} | Export-Csv -Path C:\TESTFinal.csv –NoTypeInformation }
C:\TESTReport.csv is below
COUNT(UFMID)||' | '||TESTID |
----------------------------------------------- | |
64 | 3100 |
59 | 7501 |
11 | 1700 |
16 | 3420 |
26 | 7350 |
121 | 5211 |