Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
Customers, Partners & Luminaries only: You're invited to a Data Analytics Roadmap session. Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Not applicable

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

Highlighted
Specialist
Specialist

Try this:

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

Highlighted

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

Highlighted
MVP
MVP

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

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

Highlighted
Not applicable

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

Highlighted
Not applicable

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

Highlighted
Not applicable

I require the date.

Highlighted
Not applicable

my qvw: