Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to get most recent order status, based on latest update date

Hi all,

I have an Order Number (OOT), which can have multiple different Order Statuses' during the Order Process.

There are 3 different status'. ie. In Progress ; Completed ; Finalised

I essentially want to get a count of the most up to date Status, that Order Number has. I'm thinking about a Max.

So, I'd like a text box with the Count of 'In Progress' Orders.

then a Count of 'Completed' Orders and finally a Count of 'Withdrawn' Orders.

In my attached example, this Order Number would have a Order Status of 'Finalised', as that is the Latest Update of Status. and the other's would be ignored

So, I'd just want to count this Order number, with Order Status of 'Finalised'

Any ideas would be greatly appreciated.

Cheers!

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try using the firstsortedvalue function:

FirstSortedValue([Order Status], -LAST_UPDATE_DATE)


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Not applicable
Author

Use the function FirstSortedValue()

See the manuel for more info.

/Jesper

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try using the firstsortedvalue function:

FirstSortedValue([Order Status], -LAST_UPDATE_DATE)


talk is cheap, supply exceeds demand
Not applicable
Author

Hi Gysbert,

It works perfectly if I put it in a table, but I'd like to i put it in a text box, on a dash-board.

It give a value of '0' if I use the same expression in a text-box.