Forum Discussion

Bartosz Szymański's avatar
Bartosz Szymański
Brass Contributor
Jul 31, 2017

Complicated formula to search for certain data

 

Hi guys,

I have a big problem, I'm on internsip and I've gotten a task to develop an excel file which will search the data base and take out the names of companys that stopped making transactions. For instance if one company made a transaction in 1,2,3 month and stopped in 4th I would like the excel to automaticlly show up only these companies. I tried to do it by pivot tables but it's imposible to search indyvidually in so much data, and my task was to automatize that. My other idea was to develop an complicated IF function, for instance IF B2>=1 than true and B2<1 than false and include every of 6 months in formula so in the end we might get a diffrent score(either 1 or 0) if you get 1 it means that company made transaction every month and if we get 0 company stopped making transaction at some point. I would appreciate any help, any suggestions! Lookin a likes tables included in photos bellow. Second one if how my database look like, and first is copyied pivot tables to normal sheet that executes formulas. Regards      

29 Replies

  •  Hi Bartosz Szymański,

     

    Your problem can be solved with a pivot table. Put the [Value Date] in the Values and [Customer] in the Rows. Then change the valuesettings to Max instead of Sum. Then your pivot will show the last order date for each Customer.Then sort your Pivot on the Max column and your Customers will be ordered on their last order date.

     

    Best regards,

    Martijn

    • Bartosz Szymański's avatar
      Bartosz Szymański
      Brass Contributor

      Martijn Kersten van Dijk

      No it can't. Maybe I explained my problem poorly. It's not about their last order but how they shopping pattern changed. For instance they bought my product in first, second and third month, but then they stopped or cut down orders because of some reason. And I need to find out which clients are doing that. I think that this is to complicated filer to apply in pivot table, belive me I tried pivots with poor outcome :) If you have an idea how to resolve that in pivots I'm listening.

      Thank you for your answer, regards!!

      • SergeiBaklan's avatar
        SergeiBaklan
        Diamond Contributor

        Hi Bartosz,

         

        If you need to select customers who didn't paid back few months from the given date you may add helper column which calculates such customers like

        =IF(SUMPRODUCT(($D$2:$D$82=$D2)*($A$2:$A$82>=($U$1-90))),"Pays", "Didn't pay")

        after that create pivot table on your range with customers name and filter it on ones who didn't pay, like:

         

         

        You may complicate above filtering logic as needed, but in any case it returns list of customers for fixed date.

         

        If you need to see at once for the range of dates as variant -create separate table with dates only, link it to your table and create a pivot with columns from dates table, rows with costomers and values mentioning is payment delayed or not on column date. How to implement depends, in particular, on your Excel version.

         

        Sample is attached.

  • Hi Bartosz Szymański,

     

    I just saw your sheet. You want to know the which company stopped transaction.

     

    I need some clarification. Then only i can solve. 

    1.Company name column not found in excel (if confidential, please specify which column will come as result).

    2. For your result, i've to take month and company name but company name not found. Can i take customer column for finding result.

    3. Give one manual answer that you have found.

    4. In Pivot, 1 to 6 representing months and 1 to 87 representing what company name.

    5. Is that for any type of currency or specific currency only.

    • Bartosz Szymański's avatar
      Bartosz Szymański
      Brass Contributor
      Hey, Logaraj Sekar
      1. Company name is the number in "Customer" column.
      2. Exactly
      3. For instance Customer number 1 made transactions in 1 and 3 month but he was inactive in the other months so he should be shown in output
      4. Yep
      5. Any kind, its about finding out about which clients might be disapointed with our services and for that reason they might stopped dealing with us.
      When I resolve this main issue I'll be thinking about how to apply some statistical models to that dat, and how I can divide this non active clients into groups.
      Big Thanks for your answer. Kindest regards!
      • Bartosz Szymański's avatar
        Bartosz Szymański
        Brass Contributor

        Actually, it doesnt have to be resolved in the way i described it. Every way that resolves problem and gives me customers that stopped makin transaction will be appreciated :)

Resources