## How to get COUNTIF type of formula in Anaplan Previous Contributor

## How to get COUNTIF type of formula in Anaplan

I was looking to count a list property text and come up with a numerical value total. In excel we can use countif, what can i use here in Anaplan?

2 ACCEPTED SOLUTIONS

Accepted Solutions Previous Contributor

## RE: How to get COUNTIF type of formula in Anaplan

I dont know of a simple way, but you can do with a combination of formulas. In the module that you wish to count, create another line item which will contain an IF THEN ELSE formula.  Something like IF NOT(ISBLANK(line item)) THEN 1 ELSE 0 ... or ... IF line item = "xxxx" THEN 0 ELSE 1 ... etc... Then in the summary module, use a SUM function over the line item created that will "Count" (by summing the 1s and 0s). Rgds Previous Contributor

## RE: How to get COUNTIF type of formula in Anaplan

[quote=Dino Sanchez]I was looking to count a list property text and come up with a numerical value total. In excel we can use countif, what can i use here in Anaplan?[/quote] The method Devin has given is the best way, assuming you want to count any that is not blank. If instead you wanted to get a count against each different value of the list formatted line item, you could again create two new line items:  First line item: just put '1' in the formula so that every cell contains the value 1. Second line item:  First line item [SUM: list formatted line item] and make sure this is dimensioned by the list that formats the original line item. Then the second line item will return a count of the number of cells that have each list item.
3 REPLIES 3 Previous Contributor

## RE: How to get COUNTIF type of formula in Anaplan

I dont know of a simple way, but you can do with a combination of formulas. In the module that you wish to count, create another line item which will contain an IF THEN ELSE formula.  Something like IF NOT(ISBLANK(line item)) THEN 1 ELSE 0 ... or ... IF line item = "xxxx" THEN 0 ELSE 1 ... etc... Then in the summary module, use a SUM function over the line item created that will "Count" (by summing the 1s and 0s). Rgds Previous Contributor

## RE: How to get COUNTIF type of formula in Anaplan

[quote=Dino Sanchez]I was looking to count a list property text and come up with a numerical value total. In excel we can use countif, what can i use here in Anaplan?[/quote] The method Devin has given is the best way, assuming you want to count any that is not blank. If instead you wanted to get a count against each different value of the list formatted line item, you could again create two new line items:  First line item: just put '1' in the formula so that every cell contains the value 1. Second line item:  First line item [SUM: list formatted line item] and make sure this is dimensioned by the list that formats the original line item. Then the second line item will return a count of the number of cells that have each list item.  New Contributor

## RE: How to get COUNTIF type of formula in Anaplan

This is also how I work around anaplan without a true COUNTIF() function. Hopefully one gets added to the list of functions soon!