Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Find max value of an expression.
I have an expression for machines 1-7 which says:
total transfer time = sum( If(Program <> 'DETECT STOP', DowntimeDuration))
What expression should I use, to find the machine number which gives highest value of total transfer time?
You need to take the maximum of the subtotals by machine number. It would look like this
max( aggr( sum( If(Program <> 'DETECT STOP', DowntimeDuration)) , MachineNumber ) )
Where MachineNumber is the field that stores the machine numbers.
Depending on context, you may need a TOTAL in the max()
max( TOTAL aggr( sum( If(Program <> 'DETECT STOP', DowntimeDuration)) , MachineNumber ) )