Query with Percent

C

Closemofo

Hello,

I have a table "Datas" with two fields "Customer" and "Type".
For each field "Customer", the field "type" can be different.

I wish to create a Query which would give me for each customer
the percent per Type.


Table : Datas

Customer1 Type2
Customer1 Type1
Customer1 Type3
Customer2 Type2
Customer3 Type3
Customer4 Type1
....

Result Query --->
Type1 Type2 Type3
Customer1 20% 20% 60%
Customer2 30% 30% 40%
....



Thank you for your assistance

Yves
 
J

John Vinson

Hello,

I have a table "Datas" with two fields "Customer" and "Type".
For each field "Customer", the field "type" can be different.

I wish to create a Query which would give me for each customer
the percent per Type.


Table : Datas

Customer1 Type2
Customer1 Type1
Customer1 Type3
Customer2 Type2
Customer3 Type3
Customer4 Type1
...

Result Query --->
Type1 Type2 Type3
Customer1 20% 20% 60%
Customer2 30% 30% 40%
...

A Crosstab query can do this for you; use Type as the column header
and Customer as the row header. The Crosstab Query Wizard will help
you set this up.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 

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

Similar Threads

Multiple values to link to other tables 2
Max date 3
update query with summary 2
Calculation in Query 1
update subquery 1
Subtotal query 1
Help with SUM expression 1
SQL Query + Percentage 4

Top