Counting Unique Records in a query ???

jdowski

Board Regular
Joined
Apr 21, 2002
Messages
235
Hi,

I am trying to create a field in a grouping query that counts unique records. I have a query already built that groups loans by property type. For example, in one group, I may have 15 different loans coded "apartment" but only 10 unique customers as one customer may have many loans. So what I want is the count of unique customers in each group, in my example - 10, not just the aggregate count of loans coded "apartment" - 15. I have tried within the grouping query to get a count of social security numbers but I still just get the total record count. What am I doing wrong ????

Joe in Oxford, CT. USA. :oops: :oops: :oops:
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Hi

Try a second query based on the first. Query 1 - group by property group by customer. Query 2 -group by property type- count customers.

I think this should work.
 
Upvote 0
Thank you very much Paul !!!!
You're right it worked !

I had been quite a heavy user of the Excel board hear awhile back but never had much luck the Access board but it looks like there's enough traffic on it now get some timely help....

Thanks again Paul !

Joe in Oxford, CT. USA.
(y)


PaulF said:
Hi

Try a second query based on the first. Query 1 - group by property group by customer. Query 2 -group by property type- count customers.

I think this should work.
 
Upvote 0

Forum statistics

Threads
1,221,623
Messages
6,160,889
Members
451,676
Latest member
Assy Bissy

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