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

Help - Need to pick last operation per department to calculate output

Hi,

Need to cacluated Qty Completed for the last operation for the department to calculate output per department.

Below is a simple example for one production order. In this case I need some help to 1) flag the last operation in script and then sum it in pivot, or 2) calculate this in expression. I am thinking that firstorted value can be used?

Hope someone can offer their advise.

OperationWork CenterDepartmentQty CompletedDate
10CSW230Machine2002.08.2014
20CSW310Hardening2003.08.2014
30CSW320Hardening2003.08.2014
40CSW410Surface1805.08.2014
50CSW420Surface1606.08.2014

Intended result:

DepartmentQty Completed
Machine20
Hardening20
Surface16
1 Solution

Accepted Solutions
maxgro
MVP
MVP

11 Replies
MK_QSL
MVP
MVP

Create a Straight Table

Dimension

Department

Expression

FirstSortedValue(Distinct [Qty Completed],-Date)

Not applicable
Author

Hi,

Very helpful. I forgot to mention the order number and that we have several orders in the same format that I need to sum and aggregate qty delivered per department over a period of time. How should I make this aggregation?

MK_QSL
MVP
MVP

If you provide proper data (dummy Data), would like to try for you...

Not applicable
Author

Thanks! Attached an example of dummy data for this purpose.

Regards,

Freddy

MK_QSL
MVP
MVP

Can you explain your requirements with possible output you want ?

Not applicable
Author

Yes.

Sum of Qty completed (on the last operation per department) per department per month.

This should represent the output of the department. Since we have several work centers and operations within one department we can not simply sum all work centers output.

Clear enough or do you want me to make a excel sheet showing this?

Freddy

MK_QSL
MVP
MVP

Excel sheet would be more helpful...

Not applicable
Author

Ok. Attachced.

Freddy

Not applicable
Author

Hi. Anybody that could help me on this?

Best regards,

Freddy