I cannot understand for the life of me why this isn't working, but maybe someone can help me out. It should be a simple Sum.
I have a table that is imported data from Excel. I need to total up different, for lack of a better word, Columns to get a number of HSD sales for each Agent.
Here is how I currently have the query:
SELECT [Flexcomm Import].[Rep#], Sum([Flexcomm Import]![RR7I Qty]+[Flexcomm Import]![RR7U Qty]+[Flexcomm Import]![ELKI Qty]+[Flexcomm Import]![ELKU Qty]+[Flexcomm Import]![RRLiteto7 Qty]+[Flexcomm Import]![RR10I Qty]+[Flexcomm Import]![RR10U Qty]+[Flexcomm Import]![RRLiteto10 Qty]+[Flexcomm Import]![RR15I Qty]+[Flexcomm Import]![RR15U Qty]+[Flexcomm Import]![RRliteto15 Qty]) AS HSD
FROM [Flexcomm Import]
GROUP BY [Flexcomm Import].[Rep#]
ORDER BY [Flexcomm Import.[Rep#]
For whatever reason when the query runs it is returning a value that is INSANE. 99401130, for a representative that if I total it up in Excel is only like 27.
I am only using only one table. Now I asked a similar question before and the wonderful person who replied pointed me in the direction of an article on normalization. The problem here is that I cannot change the way the data imports or how this report is done.
Each representative has a seperate row for each Customer they sold anything to. And each product type has a 0 or a 1 . 0 if nothing is sold, 1 if something was sold. So each agent can have 77 or more lines of data.
Any help would be much appreciated. Thank you.
I have a table that is imported data from Excel. I need to total up different, for lack of a better word, Columns to get a number of HSD sales for each Agent.
Here is how I currently have the query:
SELECT [Flexcomm Import].[Rep#], Sum([Flexcomm Import]![RR7I Qty]+[Flexcomm Import]![RR7U Qty]+[Flexcomm Import]![ELKI Qty]+[Flexcomm Import]![ELKU Qty]+[Flexcomm Import]![RRLiteto7 Qty]+[Flexcomm Import]![RR10I Qty]+[Flexcomm Import]![RR10U Qty]+[Flexcomm Import]![RRLiteto10 Qty]+[Flexcomm Import]![RR15I Qty]+[Flexcomm Import]![RR15U Qty]+[Flexcomm Import]![RRliteto15 Qty]) AS HSD
FROM [Flexcomm Import]
GROUP BY [Flexcomm Import].[Rep#]
ORDER BY [Flexcomm Import.[Rep#]
For whatever reason when the query runs it is returning a value that is INSANE. 99401130, for a representative that if I total it up in Excel is only like 27.
I am only using only one table. Now I asked a similar question before and the wonderful person who replied pointed me in the direction of an article on normalization. The problem here is that I cannot change the way the data imports or how this report is done.
Each representative has a seperate row for each Customer they sold anything to. And each product type has a 0 or a 1 . 0 if nothing is sold, 1 if something was sold. So each agent can have 77 or more lines of data.
Any help would be much appreciated. Thank you.
Comment