
1. Re: Different formulas for Different Quarter
Vijay Kulkarni Aug 20, 2018 12:25 AM (in response to pavan kumar)Hi Pavan Kumar,
You are getting error 'cannot mix aggregate and non aggregate comparisons or results in IF expressions' in your formula. I copied the the same formula and revised it with function attr to resolve it. Also, used function zn to get value for 2018 Q1 as there is NULL value for Amount in previous quarter,
Please check the revised workbook attached. Let me know if it works for you.
Vijay

Q4_v10.2.twbx 19.6 KB


2. Re: Different formulas for Different Quarter
pavan kumar Aug 20, 2018 1:40 AM (in response to Vijay Kulkarni)Hi Vijay ,
Thanks
for the reply , its working now.
There is another one i need to calculate.
could you plz check Calculation1 field which is in the view, i am not getting any output.
plz find attached work book

Q4.twbx 17.4 KB


3. Re: Different formulas for Different Quarter
Naveen B Aug 20, 2018 1:47 AM (in response to pavan kumar)1 of 1 people found this helpfulHi Pavan,
Lookup is table calculation and the sum is also aggregated function in order to align your calculation change your formula like below
if ATTR(CONTAINS([Quarter],"Q4")) then
SUM([Amount])+ZN(LOOKUP(SUM([Amount]),1))*.1
else
SUM([Amount])+ZN(LOOKUP(SUM([Amount]),1))*.5
end
ATTR  Will convert your dimension to the aggregated value it will help to resolve your issue
Hope this helps kindly mark this answer as correct and helpful so that it will be helpful to others
BR,
NB

4. Re: Different formulas for Different Quarter
pavan kumar Aug 20, 2018 4:07 AM (in response to Naveen B)krishna parmarElissa FinkAmy Schneider
for the reply , its working now.
There is another one i need to calculate.
could you plz check Calculation1 field which is in the view, i am not getting any output.
for "term 1" i want Term1 Amount *.5 +Term 2 Amount
for "term2" i want Term1 Amount*.5*3+Term2 Amount*0
plz find attached work book

Q4.twbx 17.4 KB
