Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

% of Users in Excel PivotTable

Status
Not open for further replies.

jjb373

MIS
Feb 4, 2005
95
US
My scenario is as follows: I have a list of users who have access to a site. When a users visits the site, activity is tracked (basically a hit counter).

After bring my data into Excel I am trying to do a quick analysis to show total # of users with access to site by group, # of users who have accessed the site by group, and based on those two values the % of users accessing the site by group.

My data looks like this but image approx. 1500 records:

User Group # Visits
1 Teacher 5
2 Admin 25
3 Admin
4 Teacher 6


I did a quick PivotTable to give me the count of each column but want to add an additional column to display % of users visiting the site.

Any ideas? Whenever I have done this I get: #DIV/0!



-- JJB373 --
 


Hi,

You get #DIV/0! when your DIVISOR is, uh, er, ummmm

ZERO!

So it is usually best to test the divisor for ZERO and decide what to display in the case of the divisor being ZERO, like...
[tt]
=IF($A$1=0,0,B1/$A$1)
[/tt]


Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Skip - I understand if the value is a zero then you won't be able to divide. But my scenario is different.

I am generating a pivottable and want to take the difference of two measures within the Values section of the PivotTable.

My example:

row labels contain: group type (ex: teacher, admin, student)
values: count of userID (as one measure)
count of # visits (as another measure)

I want to add another value to my pivottable which is the different of my 2 measures: count of # visits / count of userID

-- JJB373 --
 



What is your PT formula?

BTW, your SUM of # visits / count of userID is not a DIFFERENCE. Rather it is a QUOTIENT.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top