Print report based on a criteria of a calculated field

  • Thread starter CDG via AccessMonster.com
  • Start date
C

CDG via AccessMonster.com

I have a report that totals two columns of numbers. These totals are then
used to created a calculated percentage. For example:
column 1 column 2
5 5
5 3
10 5
Totals 20 13
Percentage 65%

The report information should now only print if the percent is below 70%. Is
there an easy way to do this?

Thank you,
CDG
 
C

CDG via AccessMonster.com

I have tried to create a select query to do this, but have had little success.
The numbers in the columns that are totaled are grouped by name. This
particular group (name) must not print if the calculated percentage is less
than 70%. I have not had success in grouping and totaling a series of
numbers in a query.
As to the filter, it is my understanding that you can apply a filter in a
report. Is this incorrect.
u set the filter. then the result will be come out. u can use query to do too.
I have a report that totals two columns of numbers. These totals are then
used to created a calculated percentage. For example:
[quoted text clipped - 10 lines]
Thank you,
CDG
 
C

CDG via AccessMonster.com

I meant to say can NOT apply a filter in a report.
I have tried to create a select query to do this, but have had little success.
The numbers in the columns that are totaled are grouped by name. This
particular group (name) must not print if the calculated percentage is less
than 70%. I have not had success in grouping and totaling a series of
numbers in a query.
As to the filter, it is my understanding that you can apply a filter in a
report. Is this incorrect.
u set the filter. then the result will be come out. u can use query to do too.
[quoted text clipped - 3 lines]
 
I

Irene

u can set the filter in the report. that have a properties call filter. u can
set it. or u set it in your select query. as what i understand from u, is it
u want to get the result as below?

eg:

name column1 column2
a 5 5
a 10 3
a 5 5


the result
a 20 13

then percentage is 65%

so the final result in your report wont be showing this record. is it u
wanna do something like this?

if yes, then it is easy, as u say u have create a select query, and group
the name and sum the column1 and column 2. then u will get ( a 20
13) this result. after that u save the query(query1). after that u create one
more query. use the query (query1), then field: name, SumOfColumn1,
SumOfColumn2, and percentage: ([SumOfColumn2]/[SumOfColumn1])*100. then u set
the criteria in the percentage field there >70. so all bigger than the 70
will be shown.


CDG via AccessMonster.com said:
I meant to say can NOT apply a filter in a report.
I have tried to create a select query to do this, but have had little success.
The numbers in the columns that are totaled are grouped by name. This
particular group (name) must not print if the calculated percentage is less
than 70%. I have not had success in grouping and totaling a series of
numbers in a query.
As to the filter, it is my understanding that you can apply a filter in a
report. Is this incorrect.
u set the filter. then the result will be come out. u can use query to do too.
[quoted text clipped - 3 lines]
Thank you,
CDG
 
C

CDG via AccessMonster.com

Thank you for your reply. I was able to sum the columns and then create
query 2. The percentage column calculated perfectly - I was so excited (I
have been working on this for so long). And then.. I placed the >70 in the
criteria field and got an "overflow" error. Everything worked fine until
then. On your last post you stated "set the criteria in the percentage field.
" Is there another field I may have overlooked.
u can set the filter in the report. that have a properties call filter. u can
set it. or u set it in your select query. as what i understand from u, is it
u want to get the result as below?

eg:

name column1 column2
a 5 5
a 10 3
a 5 5

the result
a 20 13

then percentage is 65%

so the final result in your report wont be showing this record. is it u
wanna do something like this?

if yes, then it is easy, as u say u have create a select query, and group
the name and sum the column1 and column 2. then u will get ( a 20
13) this result. after that u save the query(query1). after that u create one
more query. use the query (query1), then field: name, SumOfColumn1,
SumOfColumn2, and percentage: ([SumOfColumn2]/[SumOfColumn1])*100. then u set
the criteria in the percentage field there >70. so all bigger than the 70
will be shown.
I meant to say can NOT apply a filter in a report.
[quoted text clipped - 11 lines]
 
I

Irene

I expect a divide by zero or something similar in a calculation. Maybe your
SumOfColumn1for certain name is zero. so try to check it.

CDG via AccessMonster.com said:
Thank you for your reply. I was able to sum the columns and then create
query 2. The percentage column calculated perfectly - I was so excited (I
have been working on this for so long). And then.. I placed the >70 in the
criteria field and got an "overflow" error. Everything worked fine until
then. On your last post you stated "set the criteria in the percentage field.
" Is there another field I may have overlooked.
u can set the filter in the report. that have a properties call filter. u can
set it. or u set it in your select query. as what i understand from u, is it
u want to get the result as below?

eg:

name column1 column2
a 5 5
a 10 3
a 5 5

the result
a 20 13

then percentage is 65%

so the final result in your report wont be showing this record. is it u
wanna do something like this?

if yes, then it is easy, as u say u have create a select query, and group
the name and sum the column1 and column 2. then u will get ( a 20
13) this result. after that u save the query(query1). after that u create one
more query. use the query (query1), then field: name, SumOfColumn1,
SumOfColumn2, and percentage: ([SumOfColumn2]/[SumOfColumn1])*100. then u set
the criteria in the percentage field there >70. so all bigger than the 70
will be shown.
I meant to say can NOT apply a filter in a report.
[quoted text clipped - 11 lines]
Thank you,
CDG
 
C

CDG via AccessMonster.com

Yes, you were right. There were only 2 zeros in over 150 records. I changed
the data and it works!!!
Thank you so much.
Have a great weekend.
I expect a divide by zero or something similar in a calculation. Maybe your
SumOfColumn1for certain name is zero. so try to check it.
Thank you for your reply. I was able to sum the columns and then create
query 2. The percentage column calculated perfectly - I was so excited (I
[quoted text clipped - 35 lines]
 
I

Irene

you are welcome. Have a nice weekend too!

CDG via AccessMonster.com said:
Yes, you were right. There were only 2 zeros in over 150 records. I changed
the data and it works!!!
Thank you so much.
Have a great weekend.
I expect a divide by zero or something similar in a calculation. Maybe your
SumOfColumn1for certain name is zero. so try to check it.
Thank you for your reply. I was able to sum the columns and then create
query 2. The percentage column calculated perfectly - I was so excited (I
[quoted text clipped - 35 lines]
Thank you,
CDG
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top