Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

FirstSortedValue and Count

Good day all

I am stuck!

What I wish to achieve is to return the date which is associated to the most number of orders for a day. Is firstsortedvalue the correct way to go? I have attached my app as well as a screenshot which adds more detail to my question:

Many thanks

ScottFSVCOUNT.png

8 Replies
Not applicable
Author

Do you really want the date or just order the date by the Count?

jolivares
Specialist
Specialist

Try this:

=FirstSortedValue(Date,-Aggr(Count(OrderNo),Date))

sunny_talwar

For the second part of the question, try this -> =FirstSortedValue(Date,-(Aggr(Count(OrderNo),Date)* 100000+Date))

swuehl
MVP
MVP

Part 2: Add a small value depending on date to distinguish between same Count:

=FirstSortedValue(Date,-Aggr(Count(OrderNo)+Date/1E6,Date))

Not applicable
Author

=only({<Date = {"=count(OrderNo)=Max(TOtal aggr(count(OrderNo),Date))"}>}Date) in a TextBox gives you exaktly the 15/01/2016

Not applicable
Author

Does not seem to work for some reason when I copied this expression

Not applicable
Author

I require the date.

Not applicable
Author

my qvw: