openPDC icon indicating copy to clipboard operation
openPDC copied to clipboard

Completeness reports not working

Open clackner-gpa opened this issue 2 years ago • 1 comments

Replicated in 2.9.130+. The Expected measurements statistics (ST5) reports 0 expected measurements for a Device.

clackner-gpa avatar Apr 06 '22 17:04 clackner-gpa

Workaround: Manually change Adder in measurement table. Note that this would need to be reversed when a fix is applied.

UPDATE Measurement SET Measurement.Adder = 
(SELECT COUNT(M.SignalReference) * D.FramesPerSecond*10
  FROM [openPDCv29].[dbo].[Device] AS D
  INNER JOIN Measurement AS M ON M.DeviceID = D.ID
  WHERE M.SignalReference LIKE D.Acronym + '-%' AND M.SignalTypeID <> 8 AND M.SignalTypeID <> 11
  GROUP BY D.ID, D.IsConcentrator, D.FramesPerSecond HAVING D.IsConcentrator = 0 AND D.ID = Measurement.DeviceID
  ) FROM Measurement 
WHERE SignalReference LIKE '%PMU-ST5'

clackner-gpa avatar Apr 06 '22 19:04 clackner-gpa