5 Replies Latest reply on Oct 10, 2013 6:52 AM by Shawn Wallwork

# sumif/countif

I have some millions of records of account names. I would like to use sumif() / countif() as like excel.

Any formula to do this

• ###### 1. Re: sumif/countif

You could create two calculated fields:

What Value:

IF [My Field] = x THEN [My Field] END

Then create this:

SUM([What Value]) / COUNT([What Value])

--Shawn

• ###### 2. Re: Re: sumif/countif

Thank you shawn.

I am confused with the formula. Uploaded workbook. Can you give me example in the workbook.

Many Thanks!

• ###### 3. Re: Re: Re: sumif/countif

Scuby, you didn't say what the condition was so I just picked an arbitrary 52. There's different calculations in that attached that should get you started. I think your biggest difficulty was that your "countings" came in as a dimension. I dragged it to Measures window, which then allows you to use SUM() and COUNT().

If this still doesn't make sense, better explain the condition for the sum and count, and I'll help you work it out.

--Shawn

• ###### 4. Re: sumif/countif

Shawn,

I need to group it by account manager.. sum of countings/count of countings for each manager

• ###### 5. Re: sumif/countif

Scuby, so I'm totally lost. In the workbook I attached above here's what we have:

So all the records for Abel are grouped together. The SUM of Countings = 91. The Count of Countings = 2 [because there are two records with Abel as the account manager]. And of course when you divide 91 by 2 you get 45.5.

What result were you hoping (thinking) you should get for Abel?

--Shawn