How to use COUNTIF in PowerPivot

mrxlsx

Board Regular
Joined
Dec 15, 2012
Messages
95
I want to use a particular COUNTIFS function in PowePivot. The formula looks like the below. I have all 0s and 1s in the first column called Atype and the same 0s and 1s in the next column called Btype as well. How to use the below formula in PowerPivot.......=COUNTIFS($B$2:$B$41,1)/COUNTIFS($C$2:$C$41,">="&0)... my sheet name is "Sheet1"

thank you in advance
mrxlsx
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
You would create a measure in the calculation area of your PowerPivot table and give it a name e.g. "number_of_a"

then use this syntax

number_of_a:=CALCULATE(countrows(Table1),Table1[a type]=1)

which is the equivalent of this part of your expression
=COUNTIFS($B$2:$B$41,1)

Hope this helps.
 
Upvote 0

Forum statistics

Threads
1,223,979
Messages
6,175,761
Members
452,668
Latest member
mrider123

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top