
Re: Find minimum value based on minimum date per line
Gysbert Wassenaar Jul 16, 2013 1:57 PM (in response to Cameron Scully)The set is calculated once for the entire chart, not per row, i.e. per order number. You'll need an if statement instead.
And you have nulls in your data. Those can cause your expressions to return nulls too. See this selection:
The Quantity column contains nulls because you didn't specify an aggregation function. Therefore the only() function is used and that returns null if there is more than only value. OldQty has nulls for some order numbers so null is returned for those orders. OCD also contains nulls for some orders.
Can you explain what the correct results should be and why?

Re: Find minimum value based on minimum date per line
Cameron Scully Jul 16, 2013 1:55 PM (in response to Gysbert Wassenaar )I see. I tried a few like
=min(if(OCD = min(OCD),OldQty))
=if(OCD = min(OCD), min(OldQty))
but none of them were correct, I don't see how else I could use an If statement to get the result

Re: Find minimum value based on minimum date per line
Cameron Scully Jul 18, 2013 12:25 PM (in response to Gysbert Wassenaar )I found a way around it by concatenating the quantity to the end of the date, finding the min, and using right() to get the quantity.
I was trying to find the minimum oldqty from the minimum date for each order number.
