AnsweredAssumed Answered

Retrieving Maximum Value - Powershell - No good data for calculation

Question asked by calvinw on Jan 24, 2019
Latest reply on Jan 25, 2019 by calvinw

Hi,

 

Apologies if this is simple however I'm having real difficulty extracting the maximum value for a given range in Powershell Tools.

 

My script uses:

$max2WeeksAgo = (Get-PIExpressionSummary -Times $times -Intervals 1 -SummaryType Maximum -Basis EventWeighted -Expression "'$tag'" -Connection $myPi).VALUES

 

Where $times = @("$searchStart","$searchEnd")

 

PS H:\> $times

01/03/2019 12:29:58

01/10/2019 12:29:58

 

 

It returns with "Maximum [-11057] Not Enough Values For Calculation(0% Good data)"

 

Can anyone please advise?

Outcomes