Calculations with Queries

Fede

Registered User.
Local time
Today, 03:38
Joined
Dec 1, 2010
Messages
16
Hello everyone, I still need your help ...

I have two tables "A" & "B" ... "B" is the result of a selection of "A ".

I would like to count how many times is the name "Mickey Mouse" in the "B" and how many times has this in the "A" and then calculate the percentage of presence with the results of the calculations.

I tried using the function DCount but I can not get a response ...

Does anyone know tell me how I should set this Query? and the various steps that have to do to get the percentage?
 
DCount would be my prefered method.

Please post your DCount Statement so we can comment further.
 
I don't understand this statement -->
... "B" is the result of a selection of "A ".
Can you explain what this means?

If "Mickey Mouse" appears in A and B, then you can use a totals query. All you need to do is only include that field this data is saved in, right click and select TOTALS, and create the alias field for the calculation as follows:
Code:
PercOccurence: (Count(IIF([Field] = "Mickey Mouse", 1, Null)) / Count(*)) * 100
I wonder what happened to Bugs Bunny... ???:)
 
excuse me, now I will try to explain better!

Table "A" is a table with lots of data, for example, I have "mickeymouse" has been shopping "Monday, Tuesday etc", then through other query I have the table "B" which of course contains when mickey mouse had be shopping but only the day "Monday"

So I'd like to get the percentage they tell me over the months (table A) how many times Mickey Mouse has gone to the grocery store (table B)...

I hope now i explain good!!:confused::confused:

TY
 
Still isn't understandable i'm afraid.

Let me see a screen shot of the Relationships, plus show me (on a spreadsheet) some sample data from Table A and some sample data from Table B. Five (meaningful) records will be enough.
 
Ok, now i am busy at work tomorrow i show a sample!!! Thank You very much!!!
 
i resolved my problem

Thank you for all...
 
Last edited:
Fede,
For the benefit of all those who will search these posts in future, please, as vbaInet suggested, attach a jpg or post the SQL of query that solved the issue.
Thanks.
 
i have used the ivbanet's Advice on post #3 is right, i don't know where i made a mistake

Thanks
 
i have used the ivbanet's Advice on post #3 is right, i don't know where i made a mistake

Thanks
Looks like I've been upgraded to the new Interactive vbanet service :)

Glad you got it working.
 

Users who are viewing this thread

Back
Top Bottom