What I need is to find out brand preference per customer. I have
records showing how many of each brand they have purchased in the last
5 years. I can easily create a crosstab query that will calculate
totals per brand per customer. But, what I need is to determine brand
preference, by comparing the number of each brand to the total
purchased to get a percentage. Easy enough... but I need do have a
field that will find the highest percentage per customer, and populate
with that brand name so I can have a 'brand preference' field.
Can someone point me in the right direction? 5 1292
A quick and dirty way may be to create a new query with just the
customer id and max brand, then link that query into the existing
query, the max brand will then repeat for every customer record. te**@conwaycorp.net wrote: What I need is to find out brand preference per customer. I have records showing how many of each brand they have purchased in the last 5 years. I can easily create a crosstab query that will calculate totals per brand per customer. But, what I need is to determine brand preference, by comparing the number of each brand to the total purchased to get a percentage. Easy enough... but I need do have a field that will find the highest percentage per customer, and populate with that brand name so I can have a 'brand preference' field.
Can someone point me in the right direction?
I'm not following you.
If i query customer id and max brand, i'd get the max brand of all
customers.. I need to get it for each customer.
AP wrote: A quick and dirty way may be to create a new query with just the customer id and max brand, then link that query into the existing query, the max brand will then repeat for every customer record.
te**@conwaycorp.net wrote: What I need is to find out brand preference per customer. I have records showing how many of each brand they have purchased in the last 5 years. I can easily create a crosstab query that will calculate totals per brand per customer. But, what I need is to determine brand preference, by comparing the number of each brand to the total purchased to get a percentage. Easy enough... but I need do have a field that will find the highest percentage per customer, and populate with that brand name so I can have a 'brand preference' field.
Can someone point me in the right direction?
Build One query with customer ID, brand, and Count(*), in another
query, reference query 1 and pull the max brand for each customer, call
this query 2. This should list the top brand for each customer. Link
this query in your original by customer ID, pull down the brand field.
Hope this helps, otherwise, give me specific names of the fields with a
smaple record or two te**@conwaycorp.net wrote: I'm not following you.
If i query customer id and max brand, i'd get the max brand of all customers.. I need to get it for each customer. AP wrote: A quick and dirty way may be to create a new query with just the customer id and max brand, then link that query into the existing query, the max brand will then repeat for every customer record.
te**@conwaycorp.net wrote: What I need is to find out brand preference per customer. I have records showing how many of each brand they have purchased in the last 5 years. I can easily create a crosstab query that will calculate totals per brand per customer. But, what I need is to determine brand preference, by comparing the number of each brand to the total purchased to get a percentage. Easy enough... but I need do have a field that will find the highest percentage per customer, and populate with that brand name so I can have a 'brand preference' field.
Can someone point me in the right direction?
I'm not following you.
If i query customer id and max brand, i'd get the max brand of all
customers.. I need to get it for each customer.
AP wrote: A quick and dirty way may be to create a new query with just the customer id and max brand, then link that query into the existing query, the max brand will then repeat for every customer record.
te**@conwaycorp.net wrote: What I need is to find out brand preference per customer. I have records showing how many of each brand they have purchased in the last 5 years. I can easily create a crosstab query that will calculate totals per brand per customer. But, what I need is to determine brand preference, by comparing the number of each brand to the total purchased to get a percentage. Easy enough... but I need do have a field that will find the highest percentage per customer, and populate with that brand name so I can have a 'brand preference' field.
Can someone point me in the right direction?
ignore that last post.. i only sent it once.. but it posted twice.
I think you've got me on the right track.. i'll give it a shot, thanks. te**@conwaycorp.net wrote: I'm not following you.
If i query customer id and max brand, i'd get the max brand of all customers.. I need to get it for each customer. AP wrote: A quick and dirty way may be to create a new query with just the customer id and max brand, then link that query into the existing query, the max brand will then repeat for every customer record.
te**@conwaycorp.net wrote: What I need is to find out brand preference per customer. I have records showing how many of each brand they have purchased in the last 5 years. I can easily create a crosstab query that will calculate totals per brand per customer. But, what I need is to determine brand preference, by comparing the number of each brand to the total purchased to get a percentage. Easy enough... but I need do have a field that will find the highest percentage per customer, and populate with that brand name so I can have a 'brand preference' field.
Can someone point me in the right direction? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: andreas.muller |
last post by:
Hello everyone,
I'm trying to solve this problem but can't seem to figure out how to
start. I would like to create a rating system where people can vote
(1-5 stars) on randomly displayed items....
|
by: Dirtyweeker |
last post by:
Hi,
I have a database which records fitness test results of pupils.
There are the usual name fields and then a series of fields holding results,
e.g. field BP1 and field BP2; each of these...
|
by: Jaspreet |
last post by:
I was working on some database application and had this small task of
getting the second highes marks in a class. I was able to do that using
subqueries.
Just thinking what is a good way of...
|
by: Jan |
last post by:
Hi there,
Is there a fast way to get the highest value from an array?
I've got the array strStorage(intCounter)
I tried something but it all and's to nothing
If someone good helpme, TIA
|
by: johnk |
last post by:
I have a table of items, with revision numbers. I need to extract the
items with highest revision number. The items may be listed several
times and I don't know what the highest revision number...
| |
by: lostncland |
last post by:
I am working on this program. The array has 10 scores. (there is more to this program.) Does the last "for" section make sense?
/*Defines a global constant called N throughout the file.
...
|
by: owz |
last post by:
Hi again had some more problems, all help welcome. Access 2000, SQL
My problem is as stated in the title. I want 2 display the highest and lowest priced car sold for this month. This is what I...
|
by: =?Utf-8?B?cm9kY2hhcg==?= |
last post by:
hey all,
i have an int array and was just wondering if there is a way to get the
highest value in the array?
for instance,
int myValues = new int { 0, 1, 2 }
highest value is 2.
thanks,
|
by: strife |
last post by:
Hi,
This is a homework question. I will try to keep it minimal so not to have anyone do it for me. I am really just stuck on one small spot.
I have to figure out the highest number from a users...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |