[AccessD] calculation

Stuart McLachlan stuart at lexacorp.com.pg
Mon Jul 13 11:34:14 CDT 2009


Select Patient,Dcount("*","myTable","Patient = '" & Patient & "' AND B = 3) / 
Dcount("*","myTable",Patient = '" & Patient & "'") * 100 Group  by Patient



On 13 Jul 2009 at 15:55, pedro at plex.nl wrote:

> Hello Group,
> 
> i need to calculate the percentage(%) of the value B3 in access for the total of numbers of B.
> 
> The table that is have:
> 
> ID    patient    B
> 1     AA         1
> 2     AA         1
> 3     AA         2
> 4     AA         3
> 5     BB         1
> 
> 
> Query:
> 
> patient    B(%)
> AA         25
> 
> How can i do this?
> 
> Thanks
> 
> Pedro
> 
> 
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com





More information about the AccessD mailing list