Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have one inline table:
**********************************************************
Data:
Load *
Inline
[
Server, Usage
A,10
B,25
A,15
B,12
A,40
C,25
C,30
];
**********************************************************
Now, I want to see which server has the max usage. I want to do that in expression.
using max(aggr(sum(Usage),Server)), I can figure out the max usage of the server but how I can get the name of server.
Thanks,
Kamal
try this
= max({<Server ={"=sum(Usage)>0"}>}Usage)
=FirstSortedValue(DISTINCT Server, -aggr(sum(Usage),Server))
try this
= max({<Server ={"=sum(Usage)>0"}>}Usage)
=FirstSortedValue(DISTINCT Server, -aggr(sum(Usage),Server))
May be as below:
firstsortedvalue ( Server, -Usage )
and i dont want to use variables to calculate the usage of individual servers.. .
It didn't work..sorry
what is the output you need for below data
Data:
Load *
Inline
[
Server, Usage
A,10
B,25
A,15
B,12
A,40
C,25
C,30
C,15
];
This will not work .. as it will not aggregate the data for server and will give you wrong result
the server which has the most usage. so technically after group by the server with max usage.
How about the below:
=firstsortedvalue (Server, -Aggr(Sum(Usage),Server ))
Correct this time..