The structure of your predicate is A && B && (C || D)
Setup your predicates
NSPredicate *aPredicate = [NSPredicate predicateWithFormat:@"stateCode == %d", value];
NSPredicate *bPredicate = [NSPredicate predicateWithFormat:@"invoiceDate >= %@", givenDate];
Similar do the cPredicate and dPredicate. Then first combine c and d with OR
NSArray *cdPredicateArray = @[cPredicate, dPredicate];
NSPredicate *cdPredicate = [NSCompoundPredicate orPredicateWithSubpredicates:cdPredicateArray];
and then all of them with AND
NSArray *allPredicateArray = @[aPredicate, bPredicate, cdPredicate];
NSPredicate *allPredicate = [NSCompoundPredicate andPredicateWithSubpredicates:allPredicateArray];
If I misunderstood your question and your structure is A && B && C || D
Then you have to combine A, B and C first (with AND) and then combine that result with D (with OR).