Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
c_latham
Contributor III
Contributor III

Minimum Set Analysis

Hi All,

I've got the following Expression to calculate 'TotalTimeToPick':

=interval(Time((Max({$<FROM_LOC_ID={'Repack'}>}[Transaction DateTime])) - (Min({$<Transaction={'Pick'},[Transaction To Location]={'CONTAINER'}>}[Transaction DateTime]))))

The Dimension is ORDER_DATE.

This works correctly, I have also used this and a Count of OrderID to get me AverageTimeToPick.

I am trying to work out MinimumPickTime and MaximumPickTime per ORDER_DATE but when I get an error expression no matter which way I use 'Min' and 'Max'.

If anyone can help that would be great!

Thanks

8 Replies
vishsaggi
Champion III
Champion III

Where are you using these Max and Min in your file I mean in the same chart as you used Interval() or a different chart? Can you share a sample to look into?

c_latham
Contributor III
Contributor III
Author

In the same straight table for example.

ORDER_DATETotalTimeToPickAverageTimeToPickMinimumTimeToPick
01/01/2018137840-
02/01/201810010-
03/01/201829328-

I cant share data now! I will in the morning when I'm at the PC with the full file.

vishsaggi
Champion III
Champion III

Ok. So what are the values you are expecting to see in your MinTimetoPick field?

c_latham
Contributor III
Contributor III
Author

So on anyone date I can have multiple orders (all with their own total pick time). I want Min to show the smallest picktime.

OrderDateOrderNoPickTime
01/01/2018123437
01/01/2018123523
01/01/2018123665
01/01/2018123731
01/01/2018123822

So I would expect Min for 01/01/2018 to show 22 based on the data above.

Thanks for your reply!

vishsaggi
Champion III
Champion III

Try this?

= Min(TOTAL <OrderDate> PickTime)

= Max(TOTAL <OrderDate> PickTime)

c_latham
Contributor III
Contributor III
Author

Unfortunately not! I dont know if its because my PickTime is made using this:

=interval(Time((Max({$<FROM_LOC_ID={'Repack'}>}[Transaction DateTime])) - (Min({$<Transaction={'Pick'},[Transaction To Location]={'CONTAINER'}>}[Transaction DateTime]))))


So I am using:


= Min(TOTAL <OrderDate> (interval(Time((Max({$<FROM_LOC_ID={'Repack'}>}[Transaction DateTime])) - (Min({$<Transaction={'Pick'},[Transaction To Location]={'CONTAINER'}>}[Transaction DateTime]))))))

sasiparupudi1
Master III
Master III

May Be Try

interval(

Time(

Min

(

(

Aggr(Max({$<FROM_LOC_ID={'Repack'}>}[Transaction DateTime]),ORDERDATE)

)

-

(

Aggr(Min({$<Transaction={'Pick'},[Transaction To Location]={'CONTAINER'}>}[Transaction DateTime]),ORDERDATE)

)

)

)

)

sasiparupudi1
Master III
Master III

Hi, Did you manage to make this work?