IF statement help
Hi,
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?
Thanks
A  IF Line item A = X THEN 'Item A % of Total' * 'Total Amount' ELSE 0 
B  IF Line item B = X THEN 'Item B % of Total' * 'Total Amount' ELSE 0 
C  IF Line item C = X THEN 'Item C % of Total' * 'Total Amount' ELSE 0 
A + B + C [THIS WORKS]  A' + 'B' + 'C' 
Consol.  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 
Answers

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.
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.
Kindly correct the syntax, and the formula will run smoothly.
I hope this helps.
~Anand
https://in.linkedin.com/in/anandshekhawat35645486
2 
I did that earlier but it didn't work so I changed the syntax, but now looks like it does work?! Thanks
0 
Nicely answered @anand.shekhawat !
1 