Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
nikolis_gr
Contributor III
Contributor III

Return timestamp of biggest measure per dimension

Hi community,

 

I have a table with 2 dimensions(ResourceName,SAMPLED) and Maxbits as measure like below (BOTH_BHRECORDS is the number of the records found per Resourcename):

ResourceName                                              SAMPLED                           Maxbits         BOTH_BHRECORDS
1000020T8603/1G Eth U9/M0/IF1          1/11/2018 3:00                33144                  4
1000020T8603/1G Eth U9/M0/IF1          1/11/2018 3:15                12208                  4
1000020T8603/1G Eth U9/M0/IF1          1/11/2018 3:30                12240                  4
1000020T8603/1G Eth U9/M0/IF1          1/11/2018 3:45                12616                  4
1000018T8602/1G Eth U6/M0/IF4          1/11/2018 16:15              210592               4
1000018T8602/1G Eth U6/M0/IF4          1/11/2018 16:30             199880                4
1000018T8602/1G Eth U6/M0/IF4          1/11/2018 16:45             191648                4
1000018T8602/1G Eth U6/M0/IF4          1/11/2018 17:00             192832                4

 

I am trying to pick the timestamp where the max(Maxbits) is reported per ResourceName  .

For this I have tried   the following formula:

Timestamp(FirstSortedValue(SAMPLED, -Aggr(Maxbits, ResourceName, (SAMPLED, (Ascending)))))      

but it is not working as expected since it just  returns SAMPLED per row.

Any ideas?                  

1 Solution

Accepted Solutions
sunny_talwar

How about this?

Timestamp(FirstSortedValue(TOTAL <ResourceName> SAMPLED, -Aggr(Maxbits, ResourceName)))   

View solution in original post

4 Replies
sunny_talwar

How about this?

Timestamp(FirstSortedValue(TOTAL <ResourceName> SAMPLED, -Aggr(Maxbits, ResourceName)))   

nikolis_gr
Contributor III
Contributor III
Author

It makes sense, yes

OmarBenSalem

Create a table:

as dimension resource name:

as measure or dimension:

=aggr(if(Maxbits=max(total <ResourceName> Maxbits),SAMPLED),ResourceName,Maxbits)

 

result:

Capture.PNG

OmarBenSalem

oops! havn't seen that u already've replied !