Concat (or similar effect) on Pivot Table Field and Sum with comma separation

MattDanFrank2

New Member
Joined
Sep 19, 2012
Messages
15
Office Version
  1. 365
Platform
  1. Windows
Hi all, thank you in advance for helping me solve this.

Here is an example of my data (simplified for illustration): excel 1.png

Here is what I'm trying to achieve: excel 2.png

It's the formula for column D I need help with, which needs to concat the CAR MODEL and COUNT OF CARS, if there is more than one CAR MODEL per ACCOUNT.

Thank you so much,

Matt
 

Attachments

  • excel 1.PNG
    excel 1.PNG
    19.7 KB · Views: 19
  • excel 2.PNG
    excel 2.PNG
    29.4 KB · Views: 16

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Pictures don't really help us to help you - if you can use the XL2BB add-in, you can give us sample data to just copy and paste. It would also help if you update your profile to show what version of Office you are using, as that may affect what solutions are available to you. On that note, you could do this with Power Pivot, if you have it?
 
Upvote 0
Hi RoryA, thank you for responding to me. I have updated my profile (Office 365 with Power Pivot), and downloaded Xl2bb. :)

Book1
AB
1ACCOUNTModel
24JEEP
36VW
47VW
59FORD
612AUDI
714JEEP
816FORD
920VW
1020VW
1120FORD
1255FORD
1377AUDI
1488VW
1588VW
1688VW
1799AUDI
1899VW
Sheet1


Book1
ABCD
1Count of Model
2ACCOUNTModelTotal
34JEEP1JEEP x 1
46VW1VW x 1
57VW1VW x 1
69FORD1FORD x 1
712AUDI1AUDI x 1
814JEEP1JEEP x 1
916FORD1FORD x 1
1020FORD1FORD x 1, VW x 2
11VW2
1255FORD1FORD x 1
1377AUDI1AUDI x 1
1488VW3VW x 3
1599AUDI1AUDI x 1, VW x 1
16VW1
17Grand Total17
Sheet2
 
Upvote 0
OK, so make the data into a table (if it isn't already), load it into Power Pivot, then you'll need a new measure using a formula like this (I've assumed Table1 as the table name):

Power Query:
=VAR tempTable = 
        SUMMARIZE(
            'Table1',
            [Model],
            "Count",COUNTROWS('Table1')
        )
RETURN
    CONCATENATEX(tempTable,[Model] & " " & [Count] ,", ")
 
Upvote 0
Hi RoryA,

This is the result I'm getting. Is that what you expected, please?
 

Attachments

  • excel 3.PNG
    excel 3.PNG
    242.1 KB · Views: 15
Upvote 0
It needs to be a measure, not a calculated column. create a pivot table, right-click the table name in the Field List, and New measure
 
Upvote 0

Forum statistics

Threads
1,223,693
Messages
6,173,872
Members
452,536
Latest member
Chiz511

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top