Help!

Filter reports

 
  

Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Getting Started RSS
Next:  Conditional expression help needed.  
Author Message
Charyn
External


Since: Sep 24, 2009
Posts: 1



PostPosted: Thu Sep 24, 2009 1:35 pm    Post subject: Filter reports
Archived from groups: microsoft>public>access>gettingstarted (more info?)

Good afternoon,

I am new to Access and have a tool that contains a report linked to a single
query. The items in the data are sorted by type and by class. I only want
one class to print on the report, but I want to also report to type total as
a percentage of the whole.

For example, if the total records are 100 and I have 10 records of type A in
class B (which has 50 records), I would want the % to total to reflect 10%,
not 20%
If I filter using criteria in the query, I get a % to toal of 20%

Any suggestions how I can only show the class that I want without
sacrificing the grand total?


Thanks!!
Back to top
KARL DEWEY
External


Since: Mar 03, 2006
Posts: 1616



PostPosted: Thu Sep 24, 2009 2:56 pm    Post subject: RE: Filter reports [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

If you are only pulling numbers then try this --
SELECT [type], [class], (SELECT Count([class]) FROM YourTable) AS
Total_Records, (Sum(IIF([type] = [Enter type], 1, 0)/(SELECT Count([class])
FROM YourTable)*100) AS Percent_Type
FROM YourTable
GROUP BY [type], [class]
HAVING (((YourTable.Class)=[Enter class]) AND ((YourTable.type)=[Enter
type]));


--
Build a little, test a little.


"Charyn" wrote:

> Good afternoon,
>
> I am new to Access and have a tool that contains a report linked to a single
> query. The items in the data are sorted by type and by class. I only want
> one class to print on the report, but I want to also report to type total as
> a percentage of the whole.
>
> For example, if the total records are 100 and I have 10 records of type A in
> class B (which has 50 records), I would want the % to total to reflect 10%,
> not 20%
> If I filter using criteria in the query, I get a % to toal of 20%
>
> Any suggestions how I can only show the class that I want without
> sacrificing the grand total?
>
>
> Thanks!!
>
>
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Getting Started All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum