Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
brunolelli87
Creator II
Creator II

Firstsorted value with

Hello guys

With the following expression I'm able to count the number of aircraft flying for a specific airline.

 

 

=count({<DASI ={'$(vData1)'},NCIA={$(vAirline)},ONGR={'0'}>} DISTINCT TAIL)

 

 

Where:

- DASI is a date, (DD/MM/YY)
- NCIA is the airline Name
- ONGR is 0 or 1
- TAIL is the aircraft's registration mark (each aircraft has his own and individual tail) 

I'm using this expression to count how many aircraft is flying each minute, thoughout the days... and now I would like to get the DATE where the maximum value was reached. Something like this: "The max valus is 55 on 27/03/21"

So, I was trying to use the following expression, which was working fine for some airlines, but it's not working for some others... (I'm just getting - as the output)

 

 

=Date(FirstSortedValue(TIMS, -Aggr(count({<NCIA={$(vAirline)},ONGR={'0'}>} DISTINCT TAIL), TIMS)), 'DD/MM/YY')

 

 

- TIMS is the date in timestamp format,

Do you guys have any idea about what's going on and how to solve this issue?

Thank you!

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

It could be that you have multiple dates with the same value. Try adding DISTINCT keyword to FirstSortedValue().

-Rob

View solution in original post

2 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

It could be that you have multiple dates with the same value. Try adding DISTINCT keyword to FirstSortedValue().

-Rob

brunolelli87
Creator II
Creator II
Author

WOW!!!

You are the best...
Thanks