I think I found what I need but it's not working. It keeps saying the result must be boolean, but I can't figure out why it is saying that.
Here's what my formula is that is saying it must be boolean:
NthSmallest (1,{@actualprice}, {fuelprices_.State/Prov} )
(Grouping is by route then by state)
I found this link online (
and it says this:
Description
Determines the Nth smallest value in a given field, either for the entire report or for each instance of the (condFld) group.
Overloads
NthSmallest (N, fld)
NthSmallest (N, fld, condFld)
NthSmallest (N, fld, condFld, cond)
Arguments
N is any integer from 1 to 100 (inclusive).
fld is any valid database or formula field that can be evaluated by the function.
condFld is a field used to group the values in fld by.
cond is a String indicating the type of grouping for condFld. You only specify this argument when condFld is a Date, Time, DateTime or Boolean field. For more information on the valid strings for this argument, see Conditions for summary functions.
Returns
Fractional Number
Action
Determines the Nth smallest value in a given field, either for the entire report or for each instance of the (condFld) group.
Examples
NthSmallest (1, {Customer.CUSTOMER ID}
Returns 12, where the Customer ID field contains numerical values ranging from 12 to 50.
NthSmallest(1, {Customer.CUSTOMER NAME}, {Customer.REGION})
Returns the least value in the Customer Name field, per region.
NthSmallest({orders.ORDER AMOUNT}, {Customer.REGION}, "monthly")
Groups values in the Amount field by region, then returns the least value in the Amount field for each region, per month.
Note: Using this function in a formula forces the formula to be evaluated at print time.
For more information on evaluation time considerations, see Evaluation Time.
So where exactly am I going wrong?
Thanks,
Di