Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for 
Search instead for 
Did you mean: 
nburton78
Creator
Creator

Max date less than ship date

I really hope this is easier than I'm making it out to be. Using a straight table I want to calculate the max date that occurs before the ship date.  This is what my data looks like: This is just an example, my data is actually coming in from a SQL query. 

  

lotreceiptactual ship date
a8/1/20188/4/2018
a8/2/20188/4/2018
a8/3/20188/4/2018
a8/4/20188/4/2018
a8/5/20188/4/2018
b5/6/20188/1/2018
b8/2/20188/1/2018
c8/3/20188/12/2018
d8/4/20188/13/2018
e8/5/20188/14/2018
f8/6/20188/15/2018
g8/7/20188/16/2018
g8/8/20188/17/2018
g8/9/20188/18/2018
g8/10/20188/19/2018

and this is what i want it to return. 

  

lotlast receipt
a8/5/2018
b5/6/2018
c8/3/2018
d8/4/2018
e8/5/2018
f8/6/2018
g8/10/2019

this is the expression I am using but I keep getting errors.    

Max ({$<[Creation_Date__ILCRDJ]<Actual_Ship_Date__SDADDJ> Creation_Date__ILCRDJ})

1 Solution

Accepted Solutions
sunny_talwar

Actually, try this

Max(If(receipt < [actual ship date], receipt))


Capture.PNG

View solution in original post

3 Replies
sunny_talwar

Try this

Max({<lot = {"=[Creation_Date__ILCRDJ]<Actual_Ship_Date__SDADDJ"}>} Creation_Date__ILCRDJ)

sunny_talwar

Actually, try this

Max(If(receipt < [actual ship date], receipt))


Capture.PNG

nburton78
Creator
Creator
Author

Brilliant! Worked perfectly! Thank you so much