This content has been marked as final.
Show 2 replies

1. Re: Cant get formula to work "Cannot mix aggregate and nonaggregate results in if expressions" (Sorry if this is a basic question!)
Jim Dehner Jun 26, 2018 6:21 AM (in response to Nicholas Zabilski)1 of 1 people found this helpfulGood morning
the issue is that sum() is an aggregate so every variable in the formula needs to be aggregated  in the first cclause you need to aggregate lifecycle and CO Status with Min(), MAX or Attr
IF attr( [Lifecycle] )= "Core"
OR attr([CO Status] )= "CO"
THEN SUM([Fixed IT])+SUM([Fixed TW DC OH])+[STD Sales]+SUM([Current Store OH])
ELSE SUM([Fixed Buy])
END
Jim
If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution. Thank you.

2. Re: Cant get formula to work "Cannot mix aggregate and nonaggregate results in if expressions" (Sorry if this is a basic question!)
Nicholas Zabilski Jun 26, 2018 6:44 AM (in response to Jim Dehner)That was it! I figured it was something simple that I was missing. Thank you so much!