
1. Re: Need help with the SUM if formula
Kara Follmer Apr 21, 2017 12:01 PM (in response to vita nesvetailov)2 of 2 people found this helpful1. Analysis > Create Calculated Field
2. Make a Calculated Field: IF [Code] <> 0 THEN [Sales] ELSE NULL END
3. Add that to your sheet and select the sum aggregation

2. Re: Need help with the SUM if formula
vita nesvetailov Apr 21, 2017 11:18 AM (in response to Kara Follmer)Thank you for your response but the formula does not work. Am I missing something? It is saying that I am missing an identifier.
I want the formula to say if first column code=0 then do not include the sales in the total for that code

3. Re: Need help with the SUM if formula
Abhinav Garg Apr 21, 2017 11:38 AM (in response to vita nesvetailov)1 of 1 people found this helpfulHi Vita!
So there are two ways to do this!
Method 1: Drag the Code to filter and Exclude the 0 code.
This will remove the 0 code from the listing. Something like this:
Method 2: You can make a calculated field.
if [Code] = 0 THEN 0
ELSE [Value]
END
Then bring this to the column and then add the values using Analysis tab. it should look something like this:
Let me know if you have any doubts.
Thanks!

4. Re: Need help with the SUM if formula
Deepak Rai Apr 21, 2017 11:49 AM (in response to vita nesvetailov){FIXED : SUM(IF CODE<>0 THEN [Sales] END}

5. Re: Need help with the SUM if formula
Deepak Rai Apr 21, 2017 11:51 AM (in response to vita nesvetailov)Hi Vita,
Create the Calculated Field Using:
{FIXED : SUM(IF CODE<>0 THEN [Sales] END}
and Drag it to Label to get Sum of all except for Code 0.
Hope it Helps!!!
Thanks
Deepak

6. Re: Need help with the SUM if formula
vita nesvetailov Apr 21, 2017 12:28 PM (in response to Deepak Rai)Hi Deepak, thank you for your help. It is asking for closing parenthesis or comma for SUM. I tries a few options and didn't get it to work. Any ideas?

7. Re: Need help with the SUM if formula
Abhinav Garg Apr 21, 2017 12:42 PM (in response to vita nesvetailov)1 of 1 people found this helpfulThere you go!
{FIXED : SUM(IF [Code]<>0 THEN [Value] END)}

8. Re: Need help with the SUM if formula
Deepak Rai Apr 21, 2017 12:47 PM (in response to Deepak Rai)Hi Vita
Sorry I forgot to close it.Just put a ) after END
THanks
Deepak

9. Re: Need help with the SUM if formula
vita nesvetailov Apr 23, 2017 8:35 PM (in response to Abhinav Garg)Thanks a lot! It was helpful!

10. Re: Need help with the SUM if formula
vita nesvetailov Apr 23, 2017 8:36 PM (in response to Deepak Rai)Thank you! It worked. I appreciate all your help