View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
[email protected] myemail.an@googlemail.com is offline
external usenet poster
 
Posts: 25
Default Creating a pivot table which resembles a SQL 'group by'

I'm afraid that's not feasible, as I need to change the structure of
my pivots on the fly. In other words, I cannot know from the beginning
which fields I will be grouping by, and preparing concatenated fields
for all possible combinations doesn't work - it's like killing a
mosquito with a nuclear bomb :)
I have found a slightly better solution: in Excel 2007: go to design --
report layout -- show in tabular form. Not quite the same result as

in SQL, but I guess it's the closest the piece of junk aka as Excel
can get!

On Aug 7, 1:14*pm, Duke Carey
wrote:
One way -

Create a "new" set of data that translates your 3 columns of data into 2 by
concatenating the Continent and Product columns. *Assuming Continent is in
column A and Product in B, then

=A2&" - "&B2

will give you

Asia - Red

Then build your pivot table using the new, concatenated column instead of
the distinct Continent and Product columns