# PowerPivot Countifs



## johnbird1988 (Mar 9, 2015)

Hello,

I am new to power pivots and wanted some help with a formula.

I want to convert the formula below into a calculated file in a power pivot table but cannot get it to work.


```
=COUNTIFS($B$10:$B$20,B10,$C$10:$C$20,"Y")
```

The column name for B = [Department] and the column name for C is [Active]

Thank you for your help

John


----------



## scottsen (Mar 9, 2015)

This is totally weird I get smacked around because I don't know anything about Excel.  Weird but true.

I assume COUNTIFS is ... counting the number of rows that match some criteria.   Frequently, you just don't need that in power pivot.  You simply say "=COUNTROWS(Table)" and it magically works... you put Department on Rows and it will show you the # of rows for each deparatment.   You can filter out the Active=N on the pivot table.

If you really want to write a ActiveCount it would be something like :   =CALCULATE(COUNTROWS(MyTable), MyTable[Active]="Y")


----------

