Frequencies/counts of a variable by another variable using DAX

Paul-NYS

New Member
Joined
Feb 6, 2012
Messages
23
Hi
I am new to Powerpivot and have a variable in Powerpivot that I want to run a frequency/count on, however the count would be by another variable. For example, the number of times a disposition happens within a given county. This is very easy in SAS and I am wondering if it is possible using DAX in Powerpivot?

The formula I started with was the following:

=countx(S5[phear9],S5[cnty_name])

However, that did not work. Has anyone done this before?

Paul
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
The answer involves a pivot table I think. As a starting point I'd put your County column on rows of the pivot and then write a measure that is SUM(S5[phear9]) or similar. I don't know what is stored in the [phear9] column so it's hard to say.

(Not to sound too commercial but I think you would benefit quite a bit from a copy of my book.)
 
Upvote 0

Forum statistics

Threads
1,223,956
Messages
6,175,612
Members
452,660
Latest member
Zatman

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