+ Reply to Thread
Results 1 to 16 of 16

How to display customers that have not bought an item in a pivot report

  1. #1
    Registered User
    Join Date
    05-04-2013
    Location
    Melbourne Australia
    MS-Off Ver
    Excel 2007
    Posts
    24

    How to display customers that have not bought an item in a pivot report

    Hi all

    I have a data table that contains among other things item sales with dates and customers. I am trying to set up a pivot table that can be filtered by item then by date then to only display the customers that have not bought the item in the selected period. I am using excel 2007 and I do have the field "for empty cells show zero" checked in pivot table options. I have been able to display the customers that haven't purchased the item with a zero but all the other customers display as well with the number of items they have purchased. I only want the customers that haven't purchased to be displayed for each item that is chosen in the filter field. I have attached an example workbook. The original has 40,000+ rows of data and more columns but this is a cross section of the data.

    Thanks justmeok_sample.xlsx

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,739

    Re: How to display customers that have not bought an item in a pivot report

    hows the datatable created ?
    you really need an entry for product 1 - for all customers and a 0 entry where they have not purchased

    how did you display 0 - as there are no entries for 0 - on the sample provided
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    05-04-2013
    Location
    Melbourne Australia
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: How to display customers that have not bought an item in a pivot report

    Hi Wayne

    Thank you for your reply.

    The data is exported from our WMS software and it is an item sales report so that is why there is no entry for the customers who have not purchased the product. Attached is an amended copy of the spreadsheet. Pivot 2 shows how I managed to get the zero to appear but it's not really a solution. I have since wondered if I am over-complicating it and I should just have another sheet with a formula of some kind. I have had a bit of a play around with some success but could use some help if the pivot isn't an option? The sheet called list of all customers does work to reflect the customers that haven't ordered a specific product but it is reliant on the pivot sort which is not ideal either. Sheet 1 is a formula attempt but it always returns NIL so that's not working right either. Sheet 2 has a different formula and whilst I suspect it is not right for the customers that have bought the product (ie qty is wrong) the customers with zero are at least correct. This spreadsheet is to be used as a tool for the sales team that are not experienced excel users either so it needs to be simple and intuitive for them. Any help or suggestions would be gratefully received!

    Thanks for your time

    Gayle
    Attached Files Attached Files

  4. #4
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,739

    Re: How to display customers that have not bought an item in a pivot report

    The zero customers - is only showing customers who have ordered anything at all in Jan or Feb, NOT customers who did not order anything at all.

    you have a list of customer in a sheet - 1 to 30
    do you maintain a complete list of all your customers - do they have an ID _ my experinace is customer names can be entered differently - we can cover later

    so the customers who ordered product 1 in Jan are
    Customer 7
    Customer 3
    Customer 2
    Customer 21
    Customer 23
    Customer 4
    Customer 6
    Customer 13
    Customer 15

    NOT Customer 30 as that was ordered in FEB but not in JAN

    so customers who DID NOT order in JAN are
    1,5,8,9,10,11,12,14,16,17,18,19,20,22,24,25,26,27,28,29 & 30

    and so shouldn't your report show that list

    OR am i misunderstanding what you are trying to do ?

    EDIT - I see , a list on the customer data now

    so i think that is what you are after - so can have a look - you will need to merge the lists somehow

    it maybe better with a VBA solution
    as you will need to create a list of customers for every product and date

    However - importantly , are you only interest in the previous month - that will limit the data set
    so you get a list of customers in Feb that have purchased - then you can create the FEB data , for all customers and products , using a lookup table
    once created - copy and paste special - so no formulas are involved
    then you can add the next month to the table

    you say
    This spreadsheet is to be used as a tool for the sales team that are not experienced excel users either so it needs to be simple and intuitive for them.
    how will they USE
    do you just want to send them a report or will they be doing manipulation of the data at all ?

    how many customers do you have and how many products ?
    Last edited by etaf; 03-08-2015 at 08:03 AM.

  5. #5
    Registered User
    Join Date
    05-04-2013
    Location
    Melbourne Australia
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: How to display customers that have not bought an item in a pivot report

    Hi Wayne,

    You are completely correct about the customers that didn't order in Jan! Yes our customers do have a unique ID and that is the field I would use to match to the product to see if they have bought the product. Yes it is possible to also have a complete list of the customers as I have done in my example. I am thinking a formula of some kind is the best solution?

    Thanks again

  6. #6
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,739

    Re: How to display customers that have not bought an item in a pivot report

    Yes, what about the other questions at the bottom of my Post, you may not have seen as i edited the post
    you say
    This spreadsheet is to be used as a tool for the sales team that are not experienced excel users either so it needs to be simple and intuitive for them.

    how will they USE
    do you just want to send them a report or will they be doing manipulation of the data at all ?

    how many customers do you have and how many products ?

  7. #7
    Registered User
    Join Date
    05-04-2013
    Location
    Melbourne Australia
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: How to display customers that have not bought an item in a pivot report

    Sorry Wayne you're right I didn't see the rest of the post

    We will only be using this for a special group of customers approx 100 in total and we have approx 1000 products that they can purchase. The most common use would be to determine which customers haven't purchased specific newly launched products over a period of several months although from time to time it may be used for existing products as well.

    The spreadsheet will be available on the server for the sales team to access and for them to filter any of the pivot reports to obtain the sales records they want to view, they have several pivots to choose from in the live spreadsheet. The data is updated at the beginning of each month to include the previous months data and there is currently 3 years of records in the data (50,000 rows). I was thinking that I could have another sheet that they would use to see which customers had not purchased a specific product and my aim was for them to just enter the product code in a field and for the formula to return the customer list for those customers with no sales for that product.

    Thank you!
    PS It's midnight here so I'm off to catch some shut eye and will check back in the morning
    Last edited by justmeok; 03-08-2015 at 09:03 AM.

  8. #8
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,739

    Re: How to display customers that have not bought an item in a pivot report

    my aim was for them to just enter the product code in a field and for the formula to return the customer list for those customers with no sales for that product.
    not sure if i can do with a formula - but can have ago
    if its an extraction , I have done something like that for a warranty report -

    so if they just add the product - do they also add a date range or is it just previous month
    so now it would show FEB
    then when MAR is loaded , just show MAR

    Who does the loading of the data and updating the pivot tables (refresh ) etc ?

    can you load a sample of real data and how structured - with dummy info in
    customer ID
    Products codes etc

    then we have something to work on thats close to real , rather than your example and then need to change all the formulas for a real database structure
    Last edited by etaf; 03-08-2015 at 09:07 AM.

  9. #9
    Registered User
    Join Date
    05-04-2013
    Location
    Melbourne Australia
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: How to display customers that have not bought an item in a pivot report

    Good morning

    not sure if i can do with a formula - but can have ago
    Should I maybe close this post and re-post in the formula forum since it's not really a pivot problem? I don't want to waste your time on the wrong tasks!

    so if they just add the product - do they also add a date range or is it just previous month
    so now it would show FEB
    then when MAR is loaded , just show MAR
    Sometimes they would want a specific date/date range and other times they would want to just query the entire data range eg they may want a month/s, or quarter/s or year/s.
    I have been thinking some more about this and it may be that I need to remove this from the original pivot reports spreadsheet and have this as a completely separate spreadsheet and I don't think that would be an issue.
    Up until now, when this information has been required, I have exported the data from the WMS to an excel spreadsheet with a couple of control products (there are a couple of products that all customers should have bought at some time). Although this is not foolproof it has worked quite well as a method to obtain the info!
    Once I have the data in a spreadsheet I remove the data for the control products and then just filter by the blanks for the product/s being queried which leaves a nice list of the customers that have not purchased the product for the period being queried. This of course works fine but I was hoping to automate the process in some manner as I can get multiple requests for multiple products throughout the month. Admittedly though it doesn't take a huge amount of time but it just means that they need to wait till I can get it done rather than being able to query it themselves from the central files. It probably goes without saying that they do not have access to the WMS system to extract the data themselves.

    Who does the loading of the data and updating the pivot tables (refresh ) etc ?
    I would upload and refresh the data at the beginning of each month with the previous month's data.

    I have attached a copy of the data that is imported each month although this is only for 30 customers and 50 or so products but it does have all the columns etc that are in the original spreadsheet.

    Thanks again for your help

    Justmeok_Item sales Jan to Feb 2015.xlsx
    Last edited by justmeok; 03-08-2015 at 08:45 PM.

  10. #10
    Registered User
    Join Date
    05-04-2013
    Location
    Melbourne Australia
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: How to display customers that have not bought an item in a pivot report

    Hi Wayne,

    I have been doing some more research and have come up with a formula that works. It returns the qty sold for the 2 criteria and so of course the customers with no sales
    for the product have a zero in qty. It's then a simple matter for the user to filter by "zero" to just show the customers that haven't purchased.
    I am now about to see if I can refine it further to also allow a date criteria but I wanted to quickly let you know I have had some success.
    The formula I have used is SUMIFS and the example is in the attached spreadsheet.

    Gayle

    Justmeok_Item sales Jan to Feb 2015 v2.xlsx

  11. #11
    Registered User
    Join Date
    05-04-2013
    Location
    Melbourne Australia
    MS-Off Ver
    Excel 2007
    Posts
    24

    Lightbulb Re: How to display customers that have not bought an item in a pivot report

    Me again

    I've had some success getting the dates to work as well!!! See the attached updated spreadsheet.

    Overall I think this will do the job adequately. I am, of course, more than happy to hear any suggested improvements/variations to this entire process as I recognise my lack of skills in this area

    Rgds

    Gayle
    Attached Files Attached Files

  12. #12
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,739

    Re: How to display customers that have not bought an item in a pivot report

    i have made a pivot from your customers and then used a link for the product / dates from the pivot sheet

    when you change any of the 3 inputs on zerosales , it should update the pivot table

    use refresh and you will see the pivot table works OK - but the macro will run anyway and list all zero customers

    EDIT _ Just tried in office 13 on a different PC and it works - just adding some error testing for the product ID - so if you put a product that does not exist - you will get zero for ALL customers - which maybe what you want
    but in C1 see error handling

    EDIT _ Your CUSTOMER G has a SPACE after the G - so does not match in your customer sheets and so returns zero rather than a value - see
    product 3
    you may have others like that
    Attached Files Attached Files
    Last edited by etaf; 03-09-2015 at 12:03 PM.

  13. #13
    Registered User
    Join Date
    05-04-2013
    Location
    Melbourne Australia
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: How to display customers that have not bought an item in a pivot report

    Hi there!

    Sorry for the silence from my side - things have been so hectic this week. I have just downloaded the spreadsheet and will have a play around with it on Sunday. Thank you so much for your efforts so far! I'm excited to see what you have done

  14. #14
    Registered User
    Join Date
    05-04-2013
    Location
    Melbourne Australia
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: How to display customers that have not bought an item in a pivot report

    Thank you so much for your suggestions! I really like the pivot report solution and when I set my example spreadsheet up the same way with the refresh macro it worked wonderfully well
    I then set it up in the live data spreadsheet but unfortunately when I entered the macro and then changed the item code Excel continually crashed and sometimes comes up with a system memory error message.
    I have reverted to the spreadsheet without the refresh macro and it's happy if you just manually refresh by using ALT + F5. I think this workaround is ok unless you have any other ideas?

    Thanks also for pointing out the error I had made with Customer G - sorry if that caused you angst!!!!

    In the live spreadsheet I had actually created a data validation list for the product code so they can only choose a valid product. I did think of using some kind of INDEX/MATCH formula but my skills are not as good as yours and I couldn't figure out how to get it to work! I love your formula though and will keep it for future reference !

    Your assistance is greatly appreciated

    PS I should have mentioned that after entering the macro I did save the spreadsheet as a xlsm file before testing the process

  15. #15
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,739

    Re: How to display customers that have not bought an item in a pivot report

    just tried in excel 2007 and it works OK

    perhaps a screen shot of the macro sheet

    heres mine
    Attached Images Attached Images

  16. #16
    Registered User
    Join Date
    05-04-2013
    Location
    Melbourne Australia
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: How to display customers that have not bought an item in a pivot report

    Thank you so much! This screenshot does match the macro that I entered for the example file I sent you and that works fine For some reason when I duplicate it in the actual spreadsheet it keeps crashing and coming up with a memory error and sometimes corrupts the entire spreadsheet as well. Luckily I didn't lose anything as I learnt the hard way to always take lots of back ups before doing something like this. I am wondering if perhaps my pc, which is quite old, just doesn't cope well with the process for some reason. Thanks again for your assistance and very creative solutions to my query. I have learnt so much from you and I am eager to learn more about pivots as they seem like a really powerful feature of excel that I have pretty much ignored up until now!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Pivot Report Filter - Readout/Display selected items in a cell
    By FixandFoxi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-19-2012, 10:19 AM
  2. Replies: 3
    Last Post: 11-09-2012, 09:41 PM
  3. Why do Pivots display pivot item tick boxes that are not visible in the pivot?
    By davellll in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-27-2009, 12:53 PM
  4. year end sales report with old and new customers
    By Margaret in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-22-2006, 01:35 PM
  5. How can I report all new customers that have booked training?
    By Lana in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-29-2005, 01:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1