# PI Analysis - Getting first 5 values greater than -1

Question asked by mannevt on Feb 14, 2019
Latest reply on Mar 7, 2019 by mannevt

In Pi AF structure, I have 100 Attributes to be monitored and these have -1 as default value.

Now In Analysis, what is the best way to figure out the first 5 attributes which has valid data(greater than -1) and map each of those to a corresponding Attribute

for example say

A1, A2, A3, A4, A5, A6, A7, A8, A9, A10 ..........A100 are the attributes to monitor.

suppose at some point of time I have below attribute values,

A7 - 5

A24 - 9

A43 - 6

A78 - 3

A83 - 7

A84 - 1

A96 - 4

Insuch case I should consider A7, A24, A43, A78, A83 and map them with attributes C1, C2, C3, C4, C5 and

C1 should hold value as 'A7-5' where A7 is the attribute name and 5 is its corresponding value like wise,

C2 should have A24 - 9

C3 should have A43 - 6

C4 should have A78 - 3

C5 should have A83 - 7

and at some other point it can be

A17 - 52

A21 - 74

A48 - 37

A64 - 45

A76 - 8

A78 - 23

A82 - 56

A94 - 12

In this case I should consider A17, A21, A48, A64, A76 and map them with attributes C1, C2, C3, C4, C5

C1 should have A17 - 52

C2 should have A21 - 74

C3 should have A48 - 37

C4 should have A64 - 45

C5 should have A76 - 8

Any suggestions would be greatly appreciated.