
1. Re: Error: Cannot mix Aggregate and non aggregate comparison in if expressions
Zhouyi Zhang Aug 10, 2018 6:14 PM (in response to priti.shah.0)Hi, Priti
Try this
(If Min([Actual Flag])="A" THEN
(IF Min([Account Type])= "R" THEN SUM([RRCM Actual])SUM([RRCM Budget]) ELSE SUM([RRCM Budget])SUM([RRCM Actual]) END)
END)
ZZ

2. Re: Error: Cannot mix Aggregate and non aggregate comparison in if expressions
Naveen B Aug 10, 2018 10:14 PM (in response to priti.shah.0)Hi Priti,
Try this below Calculation
(If ATTR([Actual Flag])="A" THEN
(IF ATTR([Account Type])= "R" THEN SUM([RRCM Actual])SUM([RRCM Budget]) ELSE SUM([RRCM Budget])SUM([RRCM Actual]) END)
END)
Kindly mark this answer as helpful or correct so that it will help others
BR,
NB

3. Re: Error: Cannot mix Aggregate and non aggregate comparison in if expressions
Ankit Bansal Aug 11, 2018 6:25 AM (in response to priti.shah.0)TRY THIS:
SUM(If [Actual Flag]="A" THEN
(IF [Account Type]= "R" THEN [RRCM Actual][RRCM Budget] ELSE [RRCM Budget][RRCM Actual] END)
END))

4. Re: Error: Cannot mix Aggregate and non aggregate comparison in if expressions
Mahfooj Khan Aug 12, 2018 4:27 AM (in response to priti.shah.0)Hi,
If its only related to fix the error you can use ATTR() on your [Acutal Flag] dimension.
But you said, If Acct type is "R" then Actual  Budget else Budget  Actual
Just curious why did you put condition on [Actual Flag]="A" ??
If the said statement is correct then it'd would be something like this
IF ATTR([Actual Flag])="R"
THEN SUM([RRCM Actual])SUM([RRCM Budget])
ELSE SUM([RRCM Budget])SUM([RRCM Actual])
END
Let us know if this help
Mahfooj

5. Re: Error: Cannot mix Aggregate and non aggregate comparison in if expressions
priti.shah.0 Aug 13, 2018 8:18 AM (in response to Zhouyi Zhang)Thanks All whoever answered the question.
based on your reply I learn that I need to put aggregate function on both side. this will help.
Thanks.