Praveen_Pammi

Query on Get-PIExpressionSummary  cmdlet

Discussion created by Praveen_Pammi on May 20, 2020
Latest reply on May 21, 2020 by Praveen_Pammi

Can you please help me understand why below powershell script shows count as '2'  when there are no values in the archive for the mentioned  time frame. 

 

$Global:piDataArchiveConnection=Connect-PIDataArchive -PIDataArchiveMachineName $piDataArchiveName

$times = @("01-jan-1990 00:00:00","01-jan-1991 00:00:00")

$results = Get-PIExpressionSummary -Times $times -Intervals 1 -SummaryType Count -Basis EventWeighted -Expression "'sinusoid'" -Connection $Global:piDataArchiveConnection # -ErrorAction Suspend

 

$results

 

StreamId StartTime EndTime Values
-------- --------- ------- ------
-1 31/12/1989 18:30:00 31/12/1990 18:30:00 {[Count, 2(0% Good data)]}

Outcomes