Union query filtering duplicated records

C

cpugh

What do I need to change so this query will not filter out duplicate records?
I know there is an ALL function but I cannot get the syntax to work.

TRANSFORM Sum([UNION - Gas Revenue and Other Customer Revenue].[Current
Value]) AS [SumOfCurrent Value]
SELECT [UNION - Gas Revenue and Other Customer Revenue].[District Code],
[UNION - Gas Revenue and Other Customer Revenue].Source, [UNION - Gas Revenue
and Other Customer Revenue].[District Name], [UNION - Gas Revenue and Other
Customer Revenue].[Report Date]
FROM [UNION - Gas Revenue and Other Customer Revenue]
GROUP BY [UNION - Gas Revenue and Other Customer Revenue].[District Code],
[UNION - Gas Revenue and Other Customer Revenue].Source, [UNION - Gas Revenue
and Other Customer Revenue].[District Name], [UNION - Gas Revenue and Other
Customer Revenue].[Report Date]
PIVOT [UNION - Gas Revenue and Other Customer Revenue].Category;
 
J

John Spencer

I am guessing that you don't need to change this query. You need to change
the UNION query it is built on. In the source query change UNION between
the query clauses to UNION ALL
 

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

Top