Feb 19 2024 06:18 AM - edited Feb 19 2024 06:20 AM
I am trying to create a pivot table to summarize sales data. It is based on a table that displays "jobs" every row and in each row there is a column for the customers quoted. This field can have multiple entries (if we quote a job to several different people) and I care about each one. I want to display for each customer the total quoted amount for all the jobs they fall under. How can I get a pivot table to recognize each customer (delimited by a comma)? If I try text to columns and use each column as a field in pivot table rows, it ends up putting each customer as a hierarchical entry under the first field. I want it to show each customer on the same level and group exact names from contractor 1, contractor 2 etc under one row entry.
Feb 19 2024 09:51 PM
Not top clear to me I must admit. I think I know what needs to be done but I'm stuck visualizing how things should be presented on the PivotTable. Could you:
Feb 20 2024 01:18 AM
Based on the information you've provided and the image you sent, here's how you can create a pivot table in Excel to summarize sales data with multiple customer entries per job:
1. Split the "Customers Quoted" Column:
2. Create the Pivot Table:
3. Configure Pivot Table Fields:
4. Expand All Customers:
5. (Optional) Calculate Total Quoted Amount:
Explanation:
With this approach, your pivot table will display each customer on the same level, grouped by job and contractor, without creating a hierarchy
Feb 21 2024 09:23 AM - edited Feb 21 2024 09:24 AM
I anonymized the list of what I am working with and threw in what I wish the pivot table to show. Left some explanations in the file as well. I do have Microsoft 365 and am working on desktop app. Open to reformatting if necessary but would also like to know of possible solutions with current format in addition.
Feb 21 2024 10:51 PM - edited Feb 22 2024 01:19 AM
Solution
Thanks for the sharing
How from your Table to the PivotTable
This is done with Get & Transform aka Power Query. Basically (all done with the UI only, only renamed the steps so you can easily follow & understand):
That's it for now. But this isn't good yet as there's something you didn't say and I couldn't figure out - see below
Total Jobs Won
Currently unresolved/off vs. your expectation. Once we've done the above transformations with Power Query, we get:
Consequently (assuming I understood how to count Jobs Won) in the PivotTable we get:
#1 To update the query - you will have to explain exactly how to identify a Contractor is "linked" to only 1 Customer (and to which one) when we have > 1 Customer on the same row/record (I could make an assumption but I don't like)
#2 Is it possible you have > 1 Contractor on the same row? Something like:
I'm gonna be off for +/- a week. There are other contributors to this community who can help you further with this
PS: If it was me I would take this opportunity to clean/rename the Table headers... (the query would need to be updated accordingly - easy)
Feb 23 2024 05:12 AM
Mar 01 2024 09:48 AM
(I was off). Updated the query to "fix" the [Winning Contractor] as follow:
IF [Customer] = [Winning Contractor] THEN keep the [Winning Contractor] ELSE null
Works for you or do you need something more sophisticated?
Mar 02 2024 06:25 AM
Don't know if you have this kind of record:
and if it would make sense to count jobs as follow in the PivotTable:
If it does a way to do it is attached
Feb 21 2024 10:51 PM - edited Feb 22 2024 01:19 AM
Solution
Thanks for the sharing
How from your Table to the PivotTable
This is done with Get & Transform aka Power Query. Basically (all done with the UI only, only renamed the steps so you can easily follow & understand):
That's it for now. But this isn't good yet as there's something you didn't say and I couldn't figure out - see below
Total Jobs Won
Currently unresolved/off vs. your expectation. Once we've done the above transformations with Power Query, we get:
Consequently (assuming I understood how to count Jobs Won) in the PivotTable we get:
#1 To update the query - you will have to explain exactly how to identify a Contractor is "linked" to only 1 Customer (and to which one) when we have > 1 Customer on the same row/record (I could make an assumption but I don't like)
#2 Is it possible you have > 1 Contractor on the same row? Something like:
I'm gonna be off for +/- a week. There are other contributors to this community who can help you further with this
PS: If it was me I would take this opportunity to clean/rename the Table headers... (the query would need to be updated accordingly - easy)