count distinct in Pivot table

the data is alike
A
B
C
A
when I count, I want to count how many distinct items, the result of above 
data shouls show only 3 (A, B and C).
when I use pivot, the total shows 4 (counting 2 As).
Pls help how to get this done.
0
soe (2)
2/22/2005 4:39:03 AM
excel.misc 78881 articles. 5 followers. Follow

1 Replies
327 Views

Similar Articles

[PageSpeed] 17

A pivot table won't calculate a unique count. You could add a column to 
the list, then add that field to the pivot table.

For example, to count unique items in column A, use the following formula:

   =IF(COUNTIF($A$1:A2,A2)=1,1,0)

Copy this formula down to all rows in the list, then add the field to 
the pivot table.


soe wrote:
> the data is alike
> A
> B
> C
> A
> when I count, I want to count how many distinct items, the result of above 
> data shouls show only 3 (A, B and C).
> when I use pivot, the total shows 4 (counting 2 As).
> Pls help how to get this done.


-- 
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

0
dsd1 (5911)
2/22/2005 1:13:45 PM
Reply:

Similar Artilces:

How do I store calculations from a form to a database table?
My boss and I are stuck trying to figure out how to make our calculations be stored in our database table. Currently our calculations are in the design view of the form. We are able to see the anwer to the calculations, but they are not stored in the database table. What are we doing incorrectly? Is there some other place or way that we are supposed to do calculations? Thank you for your help. The short answer is - don't. In most cases you should not try to store calculated values in a table. Calculations should be done in queries or in unbound controls on forms. Storing the value ...

ms sql # temp table
vb.net 2008 I have a MS SQL stored procedure that uses # temp tables in the following manner: create #counties (countyname varchar(20)) insert into #counties ...... select firstname, lastname, address from personlist pl inner join #counties c on pl.county = c.countyname A string of countys is passed into the procedure and turned into a temp table for filterin the personlist. I've been using this strategy for years and it's always worked fine. I use these procs as the source for MS Access reports, Delphi reports, etc. Never a problem. Now I'm trying to create a ...

Index & Match on Pivot Table
Hi, I'm using Office 97 - and was wondering if there is a way to do an Index (Match), (Match) type function on a Pivot Table? I've tried it - but I get a #value error. Does anyone know a way around this? Nelson Nelson wrote: > Hi, > > I'm using Office 97 - and was wondering if there is a way to do an Index > (Match), (Match) type function on a Pivot Table? > > I've tried it - but I get a #value error. Does anyone know a way around > this? > > Nelson > > -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextur...

Excel 2003: In a Macro,how to select a variable row length table
I wish to create a macro that will perform functions upon multiple rows of data. The number of rows of data will change every time. Problem : I create a macro by recording. I select rows of data using CTRL/down arrow on the last column and then selecting back to the first column of the first data row. This appears to 'hard code' the number of rows of data to be the number of rows that exists at the time of macro creation. When I run the macro another time it then selects the same number of rows as when the macro was created, which will then not match the new current data. i...

form creating new row in table1, looking for field value in table
Please can someone help as I have been battling all week with this problem, and haven't had a response. I have a form which uses some data from table1 to create an entry in table2 (i know duplication is bad, but as this is a live database, and i am working on a new section, this makes this complicated task easier), which works fine. however, i have a third table that has the unique ID from table1 and table2 in order to show when a table1 row of data is needed in table2 via a checkbox. This third table3 is created when elsewhere. The problem lies with bringing in the unique ID value...

Multiple results with Count
Hello Everybody, In Access 2003, I am trying to get multiple results in a query using Count with the same column and table as my source of data. So far I have been unsuccessful in bringing two results of Count onto a same query. For example: I have a list of amounts paid to different employees in a column. I want to count the rows base on two different criteria (i) rows with amounts more than $1000 each and (ii) rows with amounts less than $500. I want to get the results of these two criteria in same query but in two different fields with distinct names. What would be the structure of ...

Display a count of unique records in a query in Access 2007
Hi, I'm not sure if I should be in this group, or Reports, but I'll start here. I have a user who would like to do a count of unique records and display the information in a query, or a report. Here are the basics: She has a list of donors, some of the donors donate more than once to the same cause. What she would like is a list of the number of donors, per cause. But, if the donor ID repeats for the same cause, she does not want that ID counted again. Example: We can get a query to return a count of the records per cause. It is returning a value of "7" for a cause,...

No Group dialog box appear when working in Pivot Table
I'm trying to group a range of dates in pivot table. According to help files a dialog box should appear when selecting Group..., but nothing happens except a grouping of the entire marked range. How do I go about in order to make the Grouping dialog box show? Best Regards PerD > PerD, This might be something particular to my set-up (XL2K), but I have to build the table initially by specifying the data range *exactly* (click'n'drag on the worksheet) for grouping dates to be an option. If I use a blanket source (eg: A:B) it won't cut it. Try it again from scratch, the...

How do you get a TRUE refresh of a Pivot table
Oh Pivot tables are so good and boy, do they save on calc time and size of file! BUT.........I notice that if some of the data it relies on is changed, by some magic, it still remembers the old data and, that old data will also be shown in the table unless you physically delete those references using the drop downs. I have found that sometimes you can clear the old references by re-running the wizard backwards as it seems to refresh those references. But that doesn't work in all situations. Is there a way to remove old references automatically AND how is it possible that they still exist?...

Anyone ever seen a case where FormatConditions.Count = -1 ?
I have a case where I have a selected range (Application.Selection) that I want to do some conditional formatting on and I am seeing a case where Application.Selection.FormatConditions.Count is -1 instead of a value between 0 and 3. Anyone ever seen this before? I am sure that some sort of error condition exists, but don't know the significance of Count = -1 except that I cannot add a condition. I believe the selection is valid. Any help would be appreciated. TIA. Roy You'll see that if the selection contains cells with different conditional formatting. roybrew@att.net wrote:...

Pivot tables- 0 counts don't display
How can I get a 0 counts to display in the pivot chart and subsequent graphs. Thanks to Debra for answering my last question, it was a big help! You could enter a dummy record for each combination in the table, and leave the door field blank. For example: door floor core doortype 1 1 1 2 1 1 3 1 1 These records will be displayed in the column and row area, but won't be counted in the data area, where 'Count of Door' is used. Jim wrote: > How can I get a 0 counts to display in the pivot chart > and subs...

formula in a pivot table?
Hello guys, is that true that excel-pivot is only able to sum (meanvalue is no selectable) from a formula made table. usually you put by drag and dro the data field into your table. but you also can put by hand a formula which is quit useful sometimes. after lunching the data-field in your pivot you can say pleasy show me the minimum or the meanvalue. It looks like that is not possible when you create a data-field using formula. then excel is just able to sum that ****... do you have any other idea?? cheers, filipu -- filipu ------------------------------------------------------------...

Count Outlook messages.
Hi there I'm pretty new at Outlook 2000 so i'm not too sure weather you can do this or not but i'll try to explain it as best as i can. I'm getting messages from a specific email sender address. And what I want to do is count how many messages i am getting from this sender. I am on a network and i think we are running Windows 2000 server with Exchange 2000. I have a Win2k PC with Outlook 2000. Is there a way to count the amount of messages that i'm getting from the sender or do i need a specific type of software to do it? Thanks guys. Tell me if you need anymore ...

Sharing only forms, not tables
I have an access database. I have designed several forms which shows information retrieved by querries. I would like to share this forms with my colleagues via server. But, i dont want my colleagues to access tables and querries, because of security reasons. Could you pleae tell me a good reference to do that? How can i keep my tables in a seperate place than forms. Thanks That's not going to work. Forms have no data of their own. They read their data from and write their data to tables. If your users have not rights to read or write the tables, your forms won't work either. -- A...

question on tables and queries
I've imported 2 tables from excel and ran a query against those two tables to determined the difference. This is something I would like to do each month. I would like to keep the same settings in my database, is there a way I can easily import/update the data in the new table without creating a new one each month? The query would stay the same as I'm comparing the same two files, but the the data will be changing every month. I don't know much about access and would like to know if there is an easier way of doing this besides creating a new table and query each month? I&...

Pivot Tables: New dimension members show up checked in dropdown
I've noticed that when distinct new members are added to dimension dat they show up as checked in a dropdown list when the pivot table i refreshed. Is there anyway to disable this so that they don't show up (pre checked? Basically, I have a model that depends on a subset of the members which I have checked in a dropdown, and the rest are unchecked - an when a distinct new member is added it automatically shows up a checked in the dropdown list, which gives me wrong answers. E.g. I have Stock Tickers as a dimension and avg. price as the measure I have 10,000 Distinct Tickers of whic...

Problem with Word table in Excel
Hope someone can help. Here's my problem. I want to easily double the amounts in each row of a column in a Microsoft Word table. I exported the table to Excel, inserted a column (column B) next to the one I wanted to work with, and typed the formula =A1*2. I then copied it to the rest of the cells in the B column. Of course, it worked. All the numbers in the A column were doubled in the corresponding B-column cells. But when I went to copy the doubled B-column numbers into the A column, I got a circular reference error. Problem is that I'm copying the formula, not the actu...

Using list box adds blank record to lookup table
Hello, I have a form (frmpurchases) based on a query. My query is based on two tables. tblPurchases (master table) and tblItems (lookup table describing the item category). The field link between the two tables is the field called Items. On frmPurchases, there is a list box for selecting the type of Item. which once selected, autofills various other fields with the Items details. Everything seems to work fine and I have no problem adding records etc. The one glitch I can't figure out, is everytime I add a new purchase using frmpurchases and select the Item(list box), w...

Yes/No dropdown and table field validation
Good Morning,I'm currently working on putting a 'yes/no' dropdown box in my Accessform, without table lookup for the 'y/n' values. I had read that thetable field for this could be 1 char long, with a validation rule of:'in("Y","N")'. However, I get a datatype conflict when I test theform. When I take out the validation rule, it works seeminglyseamlessly. Is the validation rule actually needed, and can it bemade to work?Thanks,Louis A Yes/No field stores -1 for Yes (true), and 0 for No (false.)The text "Y" and "N" are not t...

Pivot table field settings--ghosted out
I'm MS-Excel 2003 pivot tables which connect to an OLAP database. I a trying to set my subtotals in the pivot table to "AVERAGE". Currently they're defaulting to the "SUM" setting. I right click on the cell (I do this for both the cell and the cel heading...same result) and select "FIELD SETTINGS". This brings up th Pivot table field window. The only options that I have that are no ghosted out are "AUTOMATIC" and "NONE". I understand that I need to tick the CUSTOM radio button under th Subtotal heading, but i am unable to do so...

Searching documents with tables
Not sure if Windows 7 issue or word issue, but I am trying to search for text in word document(s) that is in a table. In Windows Explorer I type the test in the search box and hit enter. If the text is not in a table windows search finds it perfectly, but words that are in a table it won't find. Is there a way around this? ...

What is the quickest way to copy a table to an array?
Hi everyone, I have a table to process. It can vary in size between 2-4 columns and 2-100 rows. The table is a simple thing, containing just plain text. What is the quickest/nicest way to copy the content of the table to a 2D array? Stephenc stephenc wrote: > Hi everyone, > > I have a table to process. It can vary in size between 2-4 columns > and 2-100 rows. The table is a simple thing, containing just plain > text. > > What is the quickest/nicest way to copy the content of the table to a > 2D array? > > Stephenc I would do this in th...

Table of Contents not displaying
I have been succssfully using the Table of Contents feature forever. Suddenly, it displays only codes on the screen, yet will properly print and will display properly in "Full Screen Reading" mode. Creating a PDF also displays the ToC correctly. This occurs only on my computer and will display properly on other computers. How do I fix this? Press Alt+F9 to toggle the display from field codes to field results. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "tomMedClinic" <tomMedClinic@discussion...

How do I distinguish between upper and lower case with pivot tabl.
How do I distinguish between upper and lower case items when creating a pivot table, e.g. a list of warehosue names which have combinations of both upper and lower case, lower case being one type of warehouse and the upper case ones representing a different type What you could do is add a column to the original table that attaches a "1" in front of every warehouse name whose first character is upper case. =IF(CODE(LEFT(A2))<91,1&A2,A2) And fill down. Then use this new column in your pivot table. HTH Jason Atlanta, GA >-----Original Message----- >How do I dist...

Pie chart handles in the pivot table don't function
Hi All: I have a pie chart which activates off a pivot table. I want to expand the pie chart size so that I can see it better, and I can't get the "pull" handles to work? Please advise. Really need this one answered right waay, as I am missing a deadline! Thanks, Hazel Hi, I don't believe you can resize the plotarea for a pie chart, or in fact any chart, when it is linked to a pivot table. You will need to make your own chart based on the cells. But don't you the mouse to select the cells otherwise it will create an automatic link to the pivot table and ...