Hi Ihe,(<benefitStartDate>20170101</benefitStartDate>,< benefitEndDate>20170301</ benefitEndDate>, <benefitStartDate>20170101</benefitStartDate>,< benefitEndDate>20170501</ benefitEndDate> )/distinct-values(.)is not the same as:distinct-values(<benefitStartDate>20170101</benefitStartDate>,< benefitEndDate>20170301</ benefitEndDate>, <benefitStartDate>20170101</benefitStartDate>,< benefitEndDate>20170501</ benefitEndDate> )Which returns the distinct-values for a sequence of elements.Your code returns the distinct-values for each of these (singleton) elements, it is like calling:(distinct-values(<benefitStartDate>20170101</ benefitStartDate>), distinct-values(<benefitEndDate>20170301</ benefitEndDate>), distinct-values(<benefitStartDate>20170101</ benefitStartDate>), distinct-values(<benefitEndDate>20170501</ benefitEndDate>) )Another variant, that returns the result you expected is:(<benefitStartDate>20170101</benefitStartDate>,< benefitEndDate>20170301</ benefitEndDate>, <benefitStartDate>20170101</benefitStartDate>,< benefitEndDate>20170501</ benefitEndDate> ) => distinct-values()BestMichaelAm 27.08.2017 um 13:09 schrieb Ihe Onwuka <ihe.onwuka@gmail.com>: