Distinct Count

Craigc3814

Board Regular
Joined
Mar 7, 2016
Messages
217
I have 3 tables

One is all open work that I currently have (a work item number is on this table and it gives me the date the item was opened)
Two is all work that has been Closed within the past year (work item number is on this table but it also gives me the date that item # was initiated aka Opened)
Third is just a date table

I want to distinct count all work item numbers on the Open table by Open date
I want to distinct count all work item numbers on the Closed table by initiated date
I then want to add them together and land them in a pivot table that tells me how many work item numbers were open per month (obviously using the date table).

For some reason I cannot wrap my head around the best way to do this
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
you can use something like this in a column to the side of the table:

Code:
=IF(COUNTIF($B$1:B2,B2)>1,0,1)

this will give you a one the first time a work number appears.

Then you can use a sumif.. lets' say the formula above was in column C with the work numbers in B and the original dates in A.

Then lets assume the Dates for your third table were in column J, you can put this in column K and pull down:

Code:
=SUMIFS($C:$C,$A:$A,J1)

[/code]
 
Upvote 0
One thing I know is that Distinct Count becomes available in the Value Field Settings of a Pivot Table if the 'Add this data to the Data Model ' checkbox is selected when creating the PT.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,198
Members
449,072
Latest member
DW Draft

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