Formula

R

Rubie

Hello,

I have this formula =>(Total Produced: IIf([TestResult]="A",1,0) in a query
and it works great. What can I add to this formula to get it to divide by 2.


For example my query results are 248 records but I want the results to show
124 records.

Any advice would be greatly appreciated.
 
R

Rubie

Hi Duane,

Thanks for responding. I tried that and got 0.5 in each row that had 1
before and the total records remained the same (248). Any more advice would
be appreciated.

Duane Hookom said:
How about
Total Produced: IIf([TestResult]="A", 0.5, 0)
--
Duane Hookom
Microsoft Access MVP


Rubie said:
Hello,

I have this formula =>(Total Produced: IIf([TestResult]="A",1,0) in a query
and it works great. What can I add to this formula to get it to divide by 2.


For example my query results are 248 records but I want the results to show
124 records.

Any advice would be greatly appreciated.
 
D

Duane Hookom

Are you counting or summing? Counting would result in 248 while summing
should result in half of that.

Where/how are you displaying the results? If this is a query, you should
provide the entire SQL view. If this is in a report or form, you should
provide the section and control source.

--
Duane Hookom
Microsoft Access MVP


Rubie said:
Hi Duane,

Thanks for responding. I tried that and got 0.5 in each row that had 1
before and the total records remained the same (248). Any more advice would
be appreciated.

Duane Hookom said:
How about
Total Produced: IIf([TestResult]="A", 0.5, 0)
--
Duane Hookom
Microsoft Access MVP


Rubie said:
Hello,

I have this formula =>(Total Produced: IIf([TestResult]="A",1,0) in a query
and it works great. What can I add to this formula to get it to divide by 2.


For example my query results are 248 records but I want the results to show
124 records.

Any advice would be greatly appreciated.
 
R

Rubie

I'm using a query to count data from a column in a table.

Duane Hookom said:
Are you counting or summing? Counting would result in 248 while summing
should result in half of that.

Where/how are you displaying the results? If this is a query, you should
provide the entire SQL view. If this is in a report or form, you should
provide the section and control source.

--
Duane Hookom
Microsoft Access MVP


Rubie said:
Hi Duane,

Thanks for responding. I tried that and got 0.5 in each row that had 1
before and the total records remained the same (248). Any more advice would
be appreciated.

Duane Hookom said:
How about
Total Produced: IIf([TestResult]="A", 0.5, 0)
--
Duane Hookom
Microsoft Access MVP


:

Hello,

I have this formula =>(Total Produced: IIf([TestResult]="A",1,0) in a query
and it works great. What can I add to this formula to get it to divide by 2.


For example my query results are 248 records but I want the results to show
124 records.

Any advice would be greatly appreciated.
 
D

Duane Hookom

Could you respond to:
Where/how are you displaying the results? If this is a query, you should
provide the entire SQL view. If this is in a report or form, you should
provide the section and control source.
We need some context to your question.
--
Duane Hookom
Microsoft Access MVP


Rubie said:
I'm using a query to count data from a column in a table.

Duane Hookom said:
Are you counting or summing? Counting would result in 248 while summing
should result in half of that.

Where/how are you displaying the results? If this is a query, you should
provide the entire SQL view. If this is in a report or form, you should
provide the section and control source.

--
Duane Hookom
Microsoft Access MVP


Rubie said:
Hi Duane,

Thanks for responding. I tried that and got 0.5 in each row that had 1
before and the total records remained the same (248). Any more advice would
be appreciated.

:

How about
Total Produced: IIf([TestResult]="A", 0.5, 0)
--
Duane Hookom
Microsoft Access MVP


:

Hello,

I have this formula =>(Total Produced: IIf([TestResult]="A",1,0) in a query
and it works great. What can I add to this formula to get it to divide by 2.


For example my query results are 248 records but I want the results to show
124 records.

Any advice would be greatly appreciated.
 
R

Rubie

Hi Duane,

I'm displaying the results in a form. I have =Count(*) in my Control Source
field. I added /2 and it worked. Thanx for mentioning control source.

Thanks a lot for your help!!!

Duane Hookom said:
Could you respond to:
Where/how are you displaying the results? If this is a query, you should
provide the entire SQL view. If this is in a report or form, you should
provide the section and control source.
We need some context to your question.
--
Duane Hookom
Microsoft Access MVP


Rubie said:
I'm using a query to count data from a column in a table.

Duane Hookom said:
Are you counting or summing? Counting would result in 248 while summing
should result in half of that.

Where/how are you displaying the results? If this is a query, you should
provide the entire SQL view. If this is in a report or form, you should
provide the section and control source.

--
Duane Hookom
Microsoft Access MVP


:

Hi Duane,

Thanks for responding. I tried that and got 0.5 in each row that had 1
before and the total records remained the same (248). Any more advice would
be appreciated.

:

How about
Total Produced: IIf([TestResult]="A", 0.5, 0)
--
Duane Hookom
Microsoft Access MVP


:

Hello,

I have this formula =>(Total Produced: IIf([TestResult]="A",1,0) in a query
and it works great. What can I add to this formula to get it to divide by 2.


For example my query results are 248 records but I want the results to show
124 records.

Any advice would be greatly appreciated.
 
Top