crosstab-why row values appear more than once

machumpion

Registered User.
Local time
Today, 10:00
Joined
May 26, 2016
Messages
93
I made a cross tab query
Rows (name, address, state, phone) [table: customer]
Columns: (month) [table: order]
Value: (sales $) [table: order]

when i run the query, multiple rows will appear for the same customer, therefore the sales value of that customer is not summed up for months where it displays more than 1 value per month for 1 customer.

Why is this happening?

edit: in addition to the month, the records on the orders table also show what product was ordered, i suspect that the cross tab is still segmenting by product even though it's not a field in the cross tab query. if this is the case, is there a way around it without creating a table with just the sum of orders per month and creating a query based on that?
 
Last edited:
Could you show a printscreen of what you get and what you want?
 
Could you upload you database?
 
Hi,

I've attached a simplified version of my problem. Basically I would like the redundant customer names to be reduced to one.
 

Attachments

  • Capture.PNG
    Capture.PNG
    6.8 KB · Views: 103
I'm wondering if you might have the incorrect join type in the query your are using for a source of the crosstab query. What kind of join do you have between the customers and orders tables? If it's an outer join I suggest trying an inner join.

Could you post the SQL of you source query and crosstab query?
 

Users who are viewing this thread

Back
Top Bottom