Help with a measure

Kazlik

Board Regular
Joined
Dec 9, 2014
Messages
68
I wanted to make a measure that shows the occurrence frequency for every EventID per ContentID. For example in the table below I want to see EventID 3798 appears in 2 of 3 ContentID for an occurrence frequency of 66% and so on for each EventID. The EventID can appear one or many times per ContentID.

ContentID EventID
9941912 5027
9941912 52006
9941912 3798
9941912 3798
9941916 3798
9941916 4000
9941916 8809
9941916 415816
9941917 4000
9941917 4000
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Hi.

Try a PivotTable. Go to the Insert tab and insert a pivot table.
Drag EventID into the Rows box;
Drag ContentID into the Columns box;
Drag EventID into the ∑ Values box.
Click on the dropdown arrow in the ∑ Values box to change the "Value Field Settings" and change Sum of EventID into Count of EventID.

It looked like this when I tried it:


Excel 2013
EFGHI
16Count of EventIDColumn Labels
17Row Labels994191299419169941917Grand Total
183798213
194000123
20502711
21880911
225200611
2341581611
24Grand Total44210
Sheet2
 
Upvote 0
This should do it for you.

=COUNT(Table1[ContentID] ) /
CALCULATE( COUNT(Table1[ContentID] ), ALL( Table1[ContentID] )
)

I assume ContentID in rows, EventID in columns.
 
Upvote 0

Forum statistics

Threads
1,224,078
Messages
6,176,244
Members
452,716
Latest member
Elo

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