topic IF statement help in Anaplan Platform
https://community.anaplan.com/t5/Anaplan-Platform/IF-statement-help/m-p/111088#M26874
<P>Hi,</P><P>I need some help with my formula - separately they are fine, but it doesn't quite work when I combine them together. In the consol I had initially just combined the formulas in A, B & C but it did not work so I then changed the formula slightly (see below). What should the consol formula be?</P><P>Thanks</P><P> </P><TABLE width="772"><TBODY><TR><TD width="201">A</TD><TD width="571">IF Line item A = X THEN 'Item A % of Total' * 'Total Amount' ELSE 0</TD></TR><TR><TD>B</TD><TD width="571">IF Line item B = X THEN 'Item B % of Total' * 'Total Amount' ELSE 0</TD></TR><TR><TD>C</TD><TD width="571">IF Line item C = X THEN 'Item C % of Total' * 'Total Amount' ELSE 0</TD></TR><TR><TD><STRONG>A + B + C [THIS WORKS]</STRONG></TD><TD width="571"><STRONG>A' + 'B' + 'C'</STRONG></TD></TR><TR><TD>Consol.</TD><TD width="571">IF Line item A = X THEN 'Item A % of Total' * 'Total Amount' + IF Line item B = X THEN 'Item B % of Total' * 'Total Amount' + IF Line item C = X THEN 'Item C % of Total' * 'Total Amount' ELSE 0 ELSE 0 ELSE 0 </TD></TR></TBODY></TABLE>Thu, 10 Jun 2021 16:39:33 GMTCommunityMember1134842021-06-10T16:39:33ZIF statement help
https://community.anaplan.com/t5/Anaplan-Platform/IF-statement-help/m-p/111088#M26874
<P>Hi,</P><P>I need some help with my formula - separately they are fine, but it doesn't quite work when I combine them together. In the consol I had initially just combined the formulas in A, B & C but it did not work so I then changed the formula slightly (see below). What should the consol formula be?</P><P>Thanks</P><P> </P><TABLE width="772"><TBODY><TR><TD width="201">A</TD><TD width="571">IF Line item A = X THEN 'Item A % of Total' * 'Total Amount' ELSE 0</TD></TR><TR><TD>B</TD><TD width="571">IF Line item B = X THEN 'Item B % of Total' * 'Total Amount' ELSE 0</TD></TR><TR><TD>C</TD><TD width="571">IF Line item C = X THEN 'Item C % of Total' * 'Total Amount' ELSE 0</TD></TR><TR><TD><STRONG>A + B + C [THIS WORKS]</STRONG></TD><TD width="571"><STRONG>A' + 'B' + 'C'</STRONG></TD></TR><TR><TD>Consol.</TD><TD width="571">IF Line item A = X THEN 'Item A % of Total' * 'Total Amount' + IF Line item B = X THEN 'Item B % of Total' * 'Total Amount' + IF Line item C = X THEN 'Item C % of Total' * 'Total Amount' ELSE 0 ELSE 0 ELSE 0 </TD></TR></TBODY></TABLE>Thu, 10 Jun 2021 16:39:33 GMThttps://community.anaplan.com/t5/Anaplan-Platform/IF-statement-help/m-p/111088#M26874CommunityMember1134842021-06-10T16:39:33ZRe: IF statement help
https://community.anaplan.com/t5/Anaplan-Platform/IF-statement-help/m-p/111090#M26875
<P>Hi <LI-USER uid="25315"></LI-USER>,</P><P>The three 'Else 0' that you have written in the consol. formula is incorrect. You need to use those 'Else 0' individually with every if statement just before the addition.</P><P>The formula somewhat would look like this IF Line item A = X THEN 'Item A % of Total' * 'Total Amount' ELSE 0 + IF Line item B = X THEN 'Item B % of Total' * 'Total Amount' ELSE 0 + IF Line item C = X THEN 'Item C % of Total' * 'Total Amount' ELSE 0 . Just like A+B+C.</P><P> </P><P>Kindly correct the syntax, and the formula will run smoothly.</P><P> </P><P>I hope this helps. </P><P> </P><P>~Anand</P>Thu, 10 Jun 2021 17:24:40 GMThttps://community.anaplan.com/t5/Anaplan-Platform/IF-statement-help/m-p/111090#M26875anand.shekhawat2021-06-10T17:24:40ZRe: IF statement help
https://community.anaplan.com/t5/Anaplan-Platform/IF-statement-help/m-p/111091#M26876
<P>I did that earlier but it didn't work so I changed the syntax, but now looks like it does work?! Thanks</P>Thu, 10 Jun 2021 17:36:24 GMThttps://community.anaplan.com/t5/Anaplan-Platform/IF-statement-help/m-p/111091#M26876CommunityMember1134842021-06-10T17:36:24ZRe: IF statement help
https://community.anaplan.com/t5/Anaplan-Platform/IF-statement-help/m-p/111092#M26877
<P>Nicely answered <LI-USER uid="12533"></LI-USER> !</P>Thu, 10 Jun 2021 17:54:22 GMThttps://community.anaplan.com/t5/Anaplan-Platform/IF-statement-help/m-p/111092#M26877andrewtye2021-06-10T17:54:22ZRe: IF statement help
https://community.anaplan.com/t5/Anaplan-Platform/IF-statement-help/m-p/111093#M26878
<P>Thank You <LI-USER uid="4770"></LI-USER> , a kudo coming from you means a lot.</P><P> </P><P>Unfeigned Regards,</P><P>~Anand</P>Thu, 10 Jun 2021 18:14:10 GMThttps://community.anaplan.com/t5/Anaplan-Platform/IF-statement-help/m-p/111093#M26878anand.shekhawat2021-06-10T18:14:10Z