आपके पास 16 बिक्री प्रतिनिधि के लिए बिक्री दिखाने वाली रिपोर्ट है। प्रत्येक बिक्री प्रतिनिधि एक टीम का है। आप प्रत्येक टीम के लिए कुल बिक्री दिखाते हुए एक रिपोर्ट कैसे बना सकते हैं?
वीडियो देखेंा
- क्षेत्र और टीम द्वारा बिक्री रिपोर्ट बनाएँ
- मूल डेटा की बिक्री प्रतिनिधि और क्षेत्र है
- एक दूसरी (बुरी तरह से आकार की) टेबल टीमों में बिक्री प्रतिनिधि का आयोजन करती है
- बिल विधि 1: टीम पदानुक्रम डेटा को फिर से आकार दें। दोनों श्रेणियों को Ctrl + T तालिकाओं में बनाएं
- डेटा मॉडल में डेटा जोड़कर एक पिवट टेबल बनाएं। दूसरी टेबल से टीम खींचो।
- एक रिश्ता बनाएँ
- माइक मेथड 2: एक सारांश का निर्माण करें जहां मानदंड 2 फ़ील्ड एक सरणी है!
- SUMPRODUCT फ़ंक्शन में SUMIFS पास करें
- विधि 3 विधि: पदानुक्रम तालिका को पुनर्व्यवस्थित करें ताकि बिक्री प्रतिनिधि बाईं ओर हो।
- मूल डेटा में एक VLOOKUP जोड़ें
- एक धुरी तालिका बनाएँ
- माइक विधि 4: रिबन के डेटा टैब पर रिलेशनशिप आइकन का उपयोग करें
- जब आप धुरी तालिका बनाते हैं, तो इस कार्यपुस्तिका के डेटा मॉडल का उपयोग करें चुनें
- बिल विधि 5: पावर क्वेरी। केवल कनेक्शन के रूप में लुकअप तालिका जोड़ें
- मूल तालिका को केवल लुकअप के रूप में जोड़ें
- अंतिम रिपोर्ट तैयार करने के लिए उन दो तालिकाओं, समूह को मिलाएं
वीडियो ट्रांसक्रिप्ट
ExcelPodcast Dueling, एपिसोड 188: क्षेत्र द्वारा बिक्री टीम की रिपोर्ट।
बिल: अरे। वापसी पर स्वागत है। यह एक और द्वंद्वयुद्ध एक्सेल पॉडकास्ट का समय है। मैं बिल जेलन हूं। मुझे ExcelIsFun के माइक गिरविन ने ज्वाइन किया। यह हमारा एपिसोड 188, सेल्स टीम रिपोर्ट बाय रीजन है।
ठीक है, इसलिए, यहां हमारे पास एक सवाल है, विभिन्न बिक्री प्रतिनिधि के साथ यहां एक डेटासेट, क्षेत्र द्वारा उनकी बिक्री कितनी थी, और कुछ लोगों की बिक्री दोनों क्षेत्रों में है, और फिर कंपनी ने उन चार बिक्री में उन 16 बिक्री प्रतिनिधि का आयोजन किया है टीमों, और हम यह पता लगाने की कोशिश कर रहे हैं, प्रत्येक बिक्री टीम के लिए, उनके पास कितना राजस्व था।
ठीक है। इसलिए, मेरा दृष्टिकोण यही है, आप जानते हैं, मुझे यह प्रारूप पसंद नहीं है। मैं उस प्रारूप को किसी प्रकार की तालिका, यहाँ थोड़ी सी पदानुक्रम में पुनर्व्यवस्थित करने जा रहा हूँ, यह दिखाता है कि प्रत्येक टीम के लिए जो बिक्री प्रतिनिधि हैं और फिर, यदि हम Excel 2013 या Excel 2016 में Windows का उपयोग कर रहे हैं, तो Mac नहीं , तब हम डेटा मॉडल का उपयोग कर सकते हैं, और, ऐसा करने के लिए, हमें इनमें से प्रत्येक टेबल और FORMAT AS TABLE जो कि CONTROL + T है, लेना होगा। इसलिए, पहली तालिका है जिसे वे तालिका 8 कहते हैं और दूसरी तालिका जिसे वे तालिका 9 कहते हैं। मैं इनका नाम बदलने जा रहा हूं। मैं पहला लेने जा रहा हूं और मैं इसे SALES TABLE कहने जा रहा हूं और दूसरा लेने जा रहा हूं और मैं इसे TEAM HIERARCHY कहूंगा। ठीक है।
अब, इसे देखें। Excel 2013 में, INSERT टैब पर शुरू करते हुए, हम पहले डेटा सेट से एक PIVOT टेबल बनाते हैं, लेकिन हम यह कहते हैं कि डेटा मोड में डेटा जोड़ें जो आपको यह बताने का सबसे अच्छा तरीका है कि आपको पता है कि वास्तव में आपके पास Excel के पीछे बैठा पॉवर धुरी इंजन है 2013. भले ही आप Power Pivot के लिए भुगतान नहीं कर रहे हों, भले ही आपके पास आधार स्तर Excel Office 365 या Excel हो, आपके पास वह है। ठीक है, इसलिए, यहां हमारी नई रिपोर्ट और मैं जो करने जा रहा हूं, मैं निश्चित रूप से REGION की रिपोर्ट करना चाहता हूं, इसलिए क्षेत्र हैं, और मैं कुल बिक्री देखना चाहता हूं, लेकिन मैं बिक्री टीम द्वारा इसे देखना चाहता हूं। इसकी जांच करें। मैं सभी का चयन करने जा रहा हूं और मुझे इस समूह में अन्य तालिकाओं को भी शामिल करना है, जिसमें टीम हाइअरची भी शामिल है। मैं टीम ले जाऊँगा और इसे पाठ्यक्रम में स्थानांतरित करूँगा।
अब, पहली बात जो यहाँ होने जा रही है, वह है कि हमें गलत उत्तर मिलेंगे। गलत जवाब पाने के लिए यह बहुत सामान्य है। तो, हम क्या करने जा रहे हैं, हम क्रिएट पर क्लिक करने जा रहे हैं। यदि आप '16 'में हैं, तो आप AUTO-DETECT कर सकते हैं। आइए दिखाते हैं कि वे एक्सेल 2013 में हैं जहां हम अपनी बिक्री सूची में जाते हैं। वहां एक फ़ील्ड है जिसे SALES REP कहा जाता है और यह HIERARCHY से संबंधित है, SALES REP नामक फ़ील्ड, OK पर क्लिक करें, और हमारे पास सही उत्तर हैं। माइक, आइए देखें कि आपके पास क्या है।
माइक: धन्यवाद,। हां, डेटा मॉडल एक पिवट टेबल बनाने के लिए दो अलग-अलग तालिकाओं के साथ जाने का एक शानदार तरीका है और यह वास्तव में मेरी पसंदीदा विधि है, लेकिन अगर आपको इसे एक सूत्र के साथ करना है और आपको प्रत्येक कॉलम के शीर्ष पर बिक्री टीम की आवश्यकता है इस तरह, इसका मतलब है, सूत्र के साथ, हमें शाब्दिक रूप से इस डेटा सेट के माध्यम से देखना होगा और, प्रत्येक रिकॉर्ड के लिए, मुझे पूछना होगा कि GIS या चिन या सैंडी या शीला को SALES REP = है, और फिर, अगर यह एक है शुद्ध बिक्री, मुझे कहना है, और उत्तरी अमेरिका का क्षेत्र है।
खैर, हम ऐसा कर सकते हैं। हम SUMIFS फ़ंक्शन में AND तार्किक परीक्षण और OR तार्किक परीक्षण कर सकते हैं। SUM_RANGE, वे सभी नंबर हैं, इसलिए मैं शीर्ष सेल में क्लिक करने जा रहा हूं, CONTROL + SHIFT + DOWNARROW + F4, CRITERIA_RANGE, मैं संपूर्ण SALESREP स्तंभ, CONTROL + SHIFT + DOWNARROW + F4 को हाइलाइट करने जा रहा हूं। अब, आम तौर पर हम JUNE SALES REP जैसे एकल आइटम को मापदंड में रखते हैं। वह SUMIFS को JUNE के लिए एक उत्तर देने के लिए कहता है, लेकिन, अगर मैं प्रत्येक बिक्री प्रतिनिधि के लिए 4 अलग-अलग कोशिकाओं को उजागर करता हूं - हम SUMSIFS को प्रत्येक व्यक्तिगत बिक्री प्रतिनिधि के लिए एक SUMIF करने का निर्देश दे रहे हैं।
अब, जब मैं इस सूत्र को कॉपी करता हूं, तो मुझे इसे लॉक करने की आवश्यकता होती है, लेकिन मैं इसे साइड में कॉपी करता हूं, इसे स्थानांतरित करने की आवश्यकता होती है। तो, मुझे F4 कुंजी 1, 2 बार हिट करना होगा, पंक्ति को लॉक करना होगा, लेकिन कॉलम को नहीं। अब म) जा रहा हंू। यह एक फ़ंक्शन तर्क सरणी ऑपरेशन है। यह फ़ंक्शन तर्क है। तथ्य यह है कि हमारे पास कई आइटम हैं इसका मतलब है कि यह एक सरणी ऑपरेशन है। इसलिए, जब मैं अंत में क्लिक करता हूं और F9 मारा, तो SUMIFS ने हमारी बात मानी। यह जून, Sioux, Poppi, और Tyrone के लिए कुल राशि खर्च करता है। (= SUMIFS ($ B $ 4: $ B $ 45, $ A $ 4: $ A $ 45, F $ 4: F $ 7))
अब, हमें एक और शर्त जोड़कर उन राशियों को और सीमित करने की आवश्यकता है। हमें वास्तव में जून और उत्तरी अमेरिका या सियुक्स और उत्तरी अमेरिका या पोपी और उत्तरी अमेरिका होना चाहिए, और इसी तरह। नियंत्रण + Z हम बस विस्तार करते हैं, CRITERIA RANGE 2. अब हमें REGION कॉलम देखना होगा। नियंत्रण + SHIFT + DOWNARROW + F4, और मैं एकल स्थिति पर क्लिक करने जा रहा हूँ, F4 1, 2, 3 बार कॉलम को लॉक करने के लिए लेकिन पंक्ति नहीं। अगर मैं अंत और F9 पर क्लिक करता हूं, तो वे उत्तरी अमेरिका में हमारे प्रत्येक बिक्री प्रतिनिधि के लिए योग हैं। जब हम इसे कॉपी करते हैं, SUMIFS दक्षिण अमेरिका के लिए प्रत्येक बिक्री प्रतिनिधि के लिए कुल वितरित करेगा। (= SUMIFS ($ B $ 4: $ B $ 45, $ A $ 4: $ A $ 45, F $ 4: F $ 7, $ C $ 4: $ C $ 45, $ E8)
ध्यान दें कि यह सिर्फ SUMIFS है जिसे हमें जोड़ने के लिए कई नंबर देने होंगे। नियंत्रण + Z इसलिए, मैं इसे इस SUM फ़ंक्शन में डाल सकता हूं, लेकिन SUM फ़ंक्शन NUMBER 1 तर्क, कंट्रोल + SHIFT + ENTER का उपयोग किए बिना इस सरणी ऑपरेशन की सही गणना नहीं करेगा। इसलिए, मैं धोखा देने और SUMPRODUCT का उपयोग करने जा रहा हूं। अब, आम तौर पर, SUMPRODUCT कई सरणियाँ लेता है और उन्हें गुणा करता है - जो कि PRODUCT भाग है - और फिर उन्हें जोड़ता है, लेकिन मैं अभी ARRAY1 का उपयोग करने जा रहा हूं और बस SUMPRODUCT के SUM भाग का उपयोग कर रहा हूं,), CONT + +, इसे कॉपी करें नीचे और ऊपर की ओर, और जब से मुझे बहुत सारे पागल सेल संदर्भ मिले हैं, मैं F2 में आखिरी बार आने वाला हूं और, निश्चित रूप से, यह सभी कोशिकाओं और श्रेणियों को सही मिला है। ठीक है। मैं वापस फेंकने जा रहा हूं। (= SUMPRODUCT (SUMIFS ($ B $ 4: $ B $ 45, $ A $ 4: $ A $ 45, F $ 4: F $ 7, $ C $ 4: $ C $ 45, $ E8))
Bill: What? That's crazy. Mike. Point to Mike. Oh my gosh. Putting a range of values in SUMIFS and then sending it into SUMPRODUCTS and make it treat it like an ARRAY. Hey, that is wild. We should just stop right there. Point to Mike.
Alright. Let's go back to my method but pretend that you don't have Excel 2013. You're back in Excel 2010 or, worse, Excel for the Mac. I mean, it says it's Excel. I don't know. It just drives me crazy what the Mac can or can't do. So, we’re going to take my HIERARCHY TABLE over here, and, because VLOOKUP can't look to the left, I'm going to take the SALES REP information, CONTROL+X, and paste. Yeah, I know I can do index and match. I'm not in the mood to do index and match today. Alright, so, it's really simple. Here, =VLOOKUP, take that SALESREP name over there, and we will F4 , 2 , EXACTMATCHFALSE like that, double click to copy that down. (=VLOOKUP(A4,$F$4:$G$19,2,FALSE))
Now that we have all this data back in one table, simple little INSERT, PIVOT TABLE. Even if you don't have the check box at this stage of the data model, we can build our report with SALES TEAM going across, REGION going down, and SALES like that. You can even, here, let's reverse these, REGION across and add the SALES REP in like that, in case you want to see who the sales reps were, and if, by default, if you don't want that, we could just collapse the whole group. So, from here, I go to the ANALYZE tab and collapse. Alright. So, there's our sales teams by region, and then, if someone wants to say, well, who was SALES TEAM 2, we can open that up individually, something like that. Mike, you got another one?
Mike: Still got to love VLOOKUP. It does so many amazing things and, yes, I agree with you. Excel for the Mac, that's not even Excel, is it? Alright. Okay. I have another method but I'm going to have to jump over to a different workbook. So, I just have the same two data sets and I've converted them to Excel tables and named them. There's the SALES table, there's the TEAM table, and I like your Power Pivot option so much I'm going to steal that but do it a slightly different way because, as you say, if you have Excel 2013 or later, you have the Power Pivot data model there, but it gets even better. On the DATA ribbon tab -- and I have Excel 2016 -- if you have the RELATIONSHIPS button, you can just build the relationship as if it was a VLOOKUP between these two tables and it will automatically send it to the data model.
So, here's the MANAGE RELATIONSHIPS. I'm going to click NEW. I'm going to select SALES table, SALES REP. This, in essence, is our lookup value, right, and then I'm going to select the lookup table dTEAM, and the SALES REP. This is the lookup table so it can look up SALES REP and return the SALES TEAM, but there's no VLOOKUP column. It simply is two tables in our pivot table field list. Yeah. Look at that, the relationships, when I click OK, it’s sending it to the data model.
Now I'm going to click in a cell off to the side ALT+N+V to open up CREATE PIVOTTABLE dialog box and -- look at that -- it already assumes I want the data model because there's stuff in the data model. Now I click OK and I have my two tables right there. I'm going to click the drop-down, SALES TEAM to ROW, SALES REP down below ROWS, and then SALES from the SALES TABLE down to VALUES. ROW LABELS. I don't like that so I'm going to go up to SHOW IN TABULAR, right click, NUMBER FORMATTING, something like CURRENCY, click OK.
Now, just as said, we can collapse this if we do not want to see the SALES REP, and then drag REGION down to COLUMNS, and, just like that, we have all of our sales teams’ totals for each region. I could even open this up. Whether you access the data model either through the check box in CREATE PIVOTTABLES dialog box or simply DATA, RELATIONSHIPS, that is the way to go. So fast and easy, and we can pull fields from two different tables. Alright, I'm going to throw it back to.
Bill: Whoa, Mike, the RELATIONSHIPS out here on the DATA tab, I'm sure I've never noticed that and I guess, in my defense, in the smaller version of Excel here, it doesn't have a word on it. Just looks like a tiny little icon and I realize it was new. That is super, super cool.
Alright. Let’s just do one more here. I'm going to use power query. So, on the DATA tab, GET & TRANSFORM DATA. FROM A TABLE, I select the first table, and I want to take this REGION field and I'm going to pivot it, so I'm going to create a pivot table right here in power query. I'd be careful here. The values are in the SALES area. Click OK. So, now, for each SALES REP, we have their sales to NORTH AMERICA and SOUTH AMERICA, and I'm going to call this ByRep. BYREP. I'll call it BYREP, and then HOME, CLOSE & LOAD, but I'm not going to CLOSE & LOAD to the workbook. I'm going to say ONLY CREATE CONNECTION, like that.
Alright. Then, I'll come to the second one and say that I'm going to create a query FROM A TABLE, alright, and this is just going to stay exactly the way it is. We'll call this TEAMS, and CLOSE & LOAD, CLOSE & LOAD to ONLY CREATE CONNECTION, like that.
Alright. So, now we have two different reports here and I'm going to say that I want to create a COMBINE QUERY, a MERGE QUERY, and my first query is going to be called BYREP, and then I'm going to look up into the TEAMS query. Now, this part is the part that is not intuitive at all. Click on SALES REP here, click on SALES REP here, and we want ALL FROM FIRST, MATCHING FROM SECOND. Click OK. Alright. So, now, here's all of our SALES REP information, what they sold in North America, what they sold in South America, and use the expand icon here, and all we want to get is the TEAM information. I just want to call it TEAM. I don't want to call it TEAMS.TEAM. That would be crazy.
Alright. At this point, we no longer need the SALES REP information. I'll remove that column. I'll take the TEAM and move it over to the left, and then -- check this out -- GROUP BY. We're going to GROUP BY the TEAM and the NEW COLUMN NAME is going to be called NORTH AMERICA, the OPERATION is going to be SUM, the NORTH AMERICA COLUMN, and then we'll add a second one called SOUTH AMERICA, SUM, the SOUTH AMERICA COLULMN. There we go. GROUP BY TEAM, two columns, and we have our information here.
Let's order this. So, on the HOME tab, we want to SORT A to Z. SALES TEAM 1, 2, 3, 4. There's our NORTH AMERICA. There's our SOUTH AMERICA. Now, finally, we'll CLOSE & LOAD and we have our results, and -- check this out -- that's even cooler than that. So, if I go back to BILLPQ and we take POPPI and we move POPPI to SALES TEAM 2 and then come back to our results out here, alright, so, SALES TEAM 2, we should see these numbers increase. Come here and click the refresh icon, and those numbers changed, right? How cool? How cool is that?
Alright, so, wrap up. The goal today, we're going to build a sales report by region and team. The original data has sales rep in region and then there's a lookup table -- in my opinion, badly shaped -- that organizes sales reps into teams. So, my method reshaped that data into a team hierarchy data, make both ranges into Control+T tables, create a pivot table, adding the data to the data model, and then create a relationship. Mike’s method: use SUMIFS where the Criteria2 to field is an array -- didn’t know you could do that -- and then the SUMPRODUCT function. My third method: rearrange the hierarchy table so sales rep is on the left and then do a VLOOKUP building a pivot table. Mike's method: use the RELATIONSHIP icon to build a relationship first, and then a pivot table from the workbook data model. And then, the fifth version -- the no VLOOKUP-no pivot table version in case you're afraid of both of those -- power query. Add the lookup table as a connection only, add the original table as a lookup only, doing the pivot right there to get North America and South America, merge those two tables, group by, and then group by within power query, and you can refresh.
ठीक है। अच्छा हे। मैं इस बहुत लंबे द्वंद्वयुद्ध एक्सेल पॉडकास्ट के लिए रुकने के लिए धन्यवाद देना चाहता हूं। हम आपको अगली बार से और ExcelIsFun के एक और एपिसोड के लिए देखेंगे।
फ़ाइल डाउनलोड करें
यहाँ नमूना फ़ाइल डाउनलोड करें: Duel188.xlsm