SOLVED

Pivot table - Running totals, Running % contribution calculations

%3CLINGO-SUB%20id%3D%22lingo-sub-1792587%22%20slang%3D%22en-US%22%3EPivot%20table%20-%20Running%20totals%2C%20Running%20%25%20contribution%20calculations%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1792587%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Experts%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20trying%20to%20generate%20a%20simple%20Pivot%20table%20for%20a%20table%20with%20basic%20data%20of%20Product%2C%20Product%20description%2C%20Date%20of%20sales%2C%20Sale%20Qty%20and%20Sale%20Amount.%20Pretty%20common%20data%20I%20presume.%20I%20created%20a%20table%20format%20and%20inserted%20a%20pivot%20and%20trying%20to%20do%20summary%20calculations%20for%20data%20in%202019.%20(The%20data%20has%203%20months%20of%20the%20year%202020.%20But%20I%20don't%20need%20this%20data).%26nbsp%3B%3C%2FP%3E%3CP%3EI%20would%20like%20to%20generate%20ABC%2C%20XYZ%20analysis%20table%20for%20products%20based%20on%20the%20sales%20value%20in%20Euro.%20I%20can%20get%20product%20sales%20summary%20across%20all%20the%20months%2C%20sorted%20on%20the%20yearly%20total%20and%20can%20calculate%20%25%20of%20the%20contribution%20of%20each%20product%20to%20the%20total%20value%20sum%20of%20all%20the%20products.%20No%20problem%20so%20far.%20Life%20seems%20to%20be%20good%20with%20Pivots.%26nbsp%3B%3C%2FP%3E%3CP%3ENow%20ABC%2C%20I%20want%20to%20calculate%20running%20%25%20contribution%20and%20I%20am%20struggling%20to%20get%20it%20from%20the%20pivot%20calculations%20using%20default%20options%20or%20using%20Calculated%20fields%20and%20items.%20Nothing%20is%20giving%20the%20desired%20running%20totals%20and%20running%20%25%20of%20each%20product%20contribution%20to%20the%20sum%20of%20all%20products.%20Based%20on%20the%20cumulative%20%25%2C%20would%20like%20to%20assign%20A%20(80%25%20of%20sales)%2C%20B%20(80-95%25%20of%20sales)%2C%20and%20C(95-100%25).%20But%20I%20am%20stuck%20at%20the%20running%20totals%20and%20cumulative%20%25.%20Not%20sure%20why%20I%20can't%20get%20these%20values%20from%20Pivot%3F%3C%2FP%3E%3CP%3EI%20am%20attaching%20my%20excel%20base%20sheet%20as%20well%20as%20half%20baked%20pivot%20table%20for%20your%20kind%20perusal.%3C%2FP%3E%3CP%3ECan%20experts%20help%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1792587%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1794260%22%20slang%3D%22en-US%22%3ERe%3A%20Pivot%20table%20-%20Running%20totals%2C%20Running%20%25%20contribution%20calculations%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1794260%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F795024%22%20target%3D%22_blank%22%3E%40prasad1211%3C%2FA%3E%26nbsp%3BNot%20sure%20I%20understand%20exactly%20what%20you%20are%20trying%20to%20do%2C%20but%20changed%20the%20PT%20so%20that%20it%2C%20at%20least%2C%20gives%20you%20the%20running%20totals%20as%20you%20want%20them%20to.%20Needed%20to%20add%20a%20sub-total%20at%20the%20%22Material%20ID%22%20level%20and%20collapse%20the%20field%20entirely.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1794288%22%20slang%3D%22en-US%22%3ERe%3A%20Pivot%20table%20-%20Running%20totals%2C%20Running%20%25%20contribution%20calculations%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1794288%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20a%20brilliant%20answer.%20Thank%20you%20very%20much.%3C%2FP%3E%3CP%3EWe%20couldn't%20get%20despite%20burning%20midnight%20oil%20during%20the%20weekend.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETwo%20clarifications%3C%2FP%3E%3CP%3E1.%20Material%20description%20is%20missed%20in%20the%20pivot.%20Material%20and%20Material%20descriptions%20are%20the%20two%20fields%20that%20must%20be%20displayed%20for%20the%20user%20to%20search.%26nbsp%3B%3C%2FP%3E%3CP%3E2.%20To%20my%20small%20mind%2C%20I%20don't%20get%20the%20steps%20of%20adding%20the%20sub-total%20row%20and%20collapsing.%20What%20is%20the%20governing%20logic%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ebest%3C%2FP%3E%3CP%3Eprasad%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1794425%22%20slang%3D%22en-US%22%3ERe%3A%20Pivot%20table%20-%20Running%20totals%2C%20Running%20%25%20contribution%20calculations%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1794425%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F795024%22%20target%3D%22_blank%22%3E%40prasad1211%3C%2FA%3E%26nbsp%3BRight-click%20on%20any%20item%20in%20the%20%22Material%20ID%22%20column%20and%20select%20%22Expand%20all%20fields%22.%20Then%20all%20material%20descriptions%20become%20visible%20again%2C%20and%20a%20(sub)total%20for%20each%20%22material%20ID%22%20is%20shown.%20But%20your%20table%20doesn't%20look%20how%20you%20want%20it.%20The%20sub-total%20is%20part%20of%20the%20Design%20ribbon%20(while%20a%20cell%20is%20selected%20inside%20the%20PT).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20this%20shows%20you%20is%20that%20the%20%22Show%20value%20as%20%26nbsp%3B-%20Running%20Total%20In%22%20is%20applied%20to%20the%20first%20row%20header%20%22Material%20ID%22.%20Excel%20takes%20the%20sub-totals%20for%20each%20material%20ID%20to%20create%20the%20running%20total.%20Difficult%20to%20explain%20in%20words.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20the%20material%20description%20is%20unique%20for%20every%20material%20ID%2C%20just%20leave%20it%20out%20of%20the%20PT%20that%20creates%20the%20running%20totals%20(example%20attached).%20Add%20the%20descriptions%20back%20from%20a%20master%20Materials%20table%2C%20using%20one%20of%20the%20LOOKUP%20functions%20available%20in%20Excel.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

Hi Experts,

 

I am trying to generate a simple Pivot table for a table with basic data of Product, Product description, Date of sales, Sale Qty and Sale Amount. Pretty common data I presume. I created a table format and inserted a pivot and trying to do summary calculations for data in 2019. (The data has 3 months of the year 2020. But I don't need this data). 

I would like to generate ABC, XYZ analysis table for products based on the sales value in Euro. I can get product sales summary across all the months, sorted on the yearly total and can calculate % of the contribution of each product to the total value sum of all the products. No problem so far. Life seems to be good with Pivots. 

Now ABC, I want to calculate running % contribution and I am struggling to get it from the pivot calculations using default options or using Calculated fields and items. Nothing is giving the desired running totals and running % of each product contribution to the sum of all products. Based on the cumulative %, would like to assign A (80% of sales), B (80-95% of sales), and C(95-100%). But I am stuck at the running totals and cumulative %. Not sure why I can't get these values from Pivot?

I am attaching my excel base sheet as well as half baked pivot table for your kind perusal.

Can experts help? 

 

5 Replies
Highlighted

@prasad1211 Not sure I understand exactly what you are trying to do, but changed the PT so that it, at least, gives you the running totals as you want them to. Needed to add a sub-total at the "Material ID" level and collapse the field entirely.

Highlighted

@Riny_van_Eekelen 

 

This is a brilliant answer. Thank you very much.

We couldn't get despite burning midnight oil during the weekend. 

 

Two clarifications

1. Material description is missed in the pivot. Material and Material descriptions are the two fields that must be displayed for the user to search. 

2. To my small mind, I don't get the steps of adding the sub-total row and collapsing. What is the governing logic? 

 

best

prasad

 

 

Highlighted
Best Response confirmed by prasad1211 (Occasional Contributor)
Solution

@prasad1211 Right-click on any item in the "Material ID" column and select "Expand all fields". Then all material descriptions become visible again, and a (sub)total for each "material ID" is shown. But your table doesn't look how you want it. The sub-total is part of the Design ribbon (while a cell is selected inside the PT).

 

What this shows you is that the "Show value as  - Running Total In" is applied to the first row header "Material ID". Excel takes the sub-totals for each material ID to create the running total. Difficult to explain in words.

 

If the material description is unique for every material ID, just leave it out of the PT that creates the running totals (example attached). Add the descriptions back from a master Materials table, using one of the LOOKUP functions available in Excel.

Highlighted

@Riny_van_Eekelen 

 

Thank you very much and I can live with not having Description or add it as a field outside using xlookup function. Need to understand the Pivot ways of working a bit more. Please suggest any material to study the mechanics. 

 

Best regards

prassad

Highlighted

@prasad1211 Glad I could help. May I suggest you Google for "pivot table excel". You'll get numerous hits that can teach you about all the ins and outs of pivot tables.