Formulas and pivot table are driving me insane

%3CLINGO-SUB%20id%3D%22lingo-sub-2334035%22%20slang%3D%22en-US%22%3EFormulas%20and%20pivot%20table%20are%20driving%20me%20insane%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2334035%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20attempting%20to%20connect%20data%20from%20two%20workbooks.%20I%20figured%20out%20how%20to%20import%20my%20agent's%20from%20the%20company%20workbook%20data%20to%20my%20workbook%20and%20update%20real-time.%20Now%20I%20need%20to%20figure%20out%20how%20to%20have%20the%20data%20automatically%20transition%20to%20a%20sheet%20with%20my%20specific%20team%20of%20agents.%20I%20need%20the%20sheet%20to%20match%20the%20names%20from%20the%20master%20list%20to%20the%20specific%20agents%20on%20my%20team.%20Then%20populate%20in%20a%20cell%20how%20many%20times%20the%20agent's%20score%20was%20less%20than%206%2C%20A%20cell%20for%20agents%20with%20scores%20less%20than%208%2C%20and%20a%20sell%20with%20scores%20more%20than%209.%20Next%20to%20their%20names.%20IF%20anyone%20can%20help%20I%20have%20attached%20examples.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFrom%20the%20pictures%2C%20one%20picture%20is%20the%20master%20list%20this%20list%20is%20in%20my%20workbook%20That%20I%20copied%20over%20from%20the%20company%20workbook%2C%20The%20master%20list%20contains%20all%20agent's%20scores%2C%20I%20need%20excel%20to%20extract%20data%20from%20my%20specific%20agents%20on%20my%20team%20from%20the%20master%20list.%20And%20count%20how%20many%20times%20this%20agent%20received%20a%20score%20that%20met%20the%20criteria.%20I%20need%20the%20number%20of%20detractors%2C%20passive%2C%20and%20promoters%20scores.%20I%20will%20also%20need%20this%20to%20be%20able%20to%20update%20automatically%20with%20the%20changes%20from%20the%20master%20list%20that%20is%20connected%20to%20from%20company%20workbook%20the%20agent%20can%20show%20on%20the%20master%20list%20multiple%20times.%20I%20have%20blocked%20out%20all%20sensitive%20data%20to%20assist%20with%20reviewing%20the%20layout.%20Thank%20you%20for%20your%20help!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2334035%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2339933%22%20slang%3D%22en-US%22%3ERe%3A%20Formulas%20and%20pivot%20table%20are%20driving%20me%20insane%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2339933%22%20slang%3D%22en-US%22%3Eplease%20replace%20the%20pictures%20with%20the%20rows%20and%20columns%20included%20if%20you're%20going%20to%20need%20help%20with%20formulas%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2340030%22%20slang%3D%22en-US%22%3ERe%3A%20Formulas%20and%20pivot%20table%20are%20driving%20me%20insane%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2340030%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1047576%22%20target%3D%22_blank%22%3E%40Workingmom2424%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20restrict%20myself%20to%20defined%20names%20and%20dynamic%20arrays%20so%20your%20implementation%20may%20be%20different.%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3D%20COUNTIFS(%0A%20%20%20%20%20Full_Name%2C%20Agent_Name%2C%20%0A%20%20%20%20%20NPS_score%2C%20%7B%22%26lt%3B8%22%2C%22%3D8%22%2C%22%26gt%3B8%22%7D)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20471px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F279419iE920102CF6BD8578%2Fimage-dimensions%2F471x275%3Fv%3Dv2%22%20width%3D%22471%22%20height%3D%22275%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2340186%22%20slang%3D%22en-US%22%3ERe%3A%20Formulas%20and%20pivot%20table%20are%20driving%20me%20insane%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2340186%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1047576%22%20target%3D%22_blank%22%3E%40Workingmom2424%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20with%20PivotTable%20you%20need%20to%20add%20data%20to%20data%20model%20creating%20it%20and%20add%203%20DAX%20measures%20like%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3EDefactor%3A%3DCALCULATE(COUNTROWS(MasterList)%2C%20MasterList%5BNPS%20Score%5D%20%26lt%3B%20%3CLI-EMOJI%20id%3D%22lia_smiling-face-with-sunglasses%22%20title%3D%22%3Asmiling_face_with_sunglasses%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3ETwo%20others%20are%20similar.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

I am attempting to connect data from two workbooks. I figured out how to import my agent's from the company workbook data to my workbook and update real-time. Now I need to figure out how to have the data automatically transition to a sheet with my specific team of agents. I need the sheet to match the names from the master list to the specific agents on my team. Then populate in a cell how many times the agent's score was less than 6, A cell for agents with scores less than 8, and a sell with scores more than 9. Next to their names. IF anyone can help I have attached examples. 

 

From the pictures, one picture is the master list this list is in my workbook That I copied over from the company workbook, The master list contains all agent's scores, I need excel to extract data from my specific agents on my team from the master list. And count how many times this agent received a score that met the criteria. I need the number of detractors, passive, and promoters scores. I will also need this to be able to update automatically with the changes from the master list that is connected to from company workbook the agent can show on the master list multiple times. I have blocked out all sensitive data to assist with reviewing the layout. Thank you for your help!

5 Replies
please replace the pictures with the rows and columns included if you're going to need help with formulas

@Workingmom2424 

I restrict myself to defined names and dynamic arrays so your implementation may be different.

= COUNTIFS(
     Full_Name, Agent_Name, 
     NPS_score, {"<8","=8",">8"})

image.png

@Workingmom2424 

If with PivotTable you need to add data to data model creating it and add 3 DAX measures like

Defactor:=CALCULATE(COUNTROWS(MasterList), MasterList[NPS Score] < 

Two others are similar.

@Sergei Baklan 

That was a bit of a battle for me.  I have never had access to corporate data for analysis so the pivot table is a rarely visited area (if I can't type the entire dataset in less than 10 minutes, I lose interest).

image.png

I took the RANDARRAY and used formulas to produce a separate Table that I could upload via PQ.  That generated a data model was always a refresh out of sync with the source data so I output a further static copy to the worksheet.  Then I moved to finding out how to define measures and avoid overwriting those already defined.  I have still got to get the column headers in order (I suspect that requires a custom list but who knows?).  A few lessons learnt along the way! Thank you.

 

Note: I remember reading an article that confidently asserted that between 95%-99% of spreadsheets were database tables and was struck by the extent to which it is possible to see the world from different perspectives.  When I looked at engineering companies, I got a far smaller proportion (less than a quarter).

image.png

@Peter Bartholomew 

I only jumped in with measures for the case if the solution with data model is already in place and we only need to expand it with few other measures. If Power Query already is here to pickup external data, most probably it's better to do everything with it. If nothing of above formulas you suggested is optimal variant. Everything depends on context.