Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

New Buyers

Hi all,

I am wanting to count how many new buyers there are to a branch each month.

For example if a customer hasn't bought at a specific branch in the last six months but buys this month they would be a new buyer.

Any help would be greatly appreciated.

Thanks

6 Replies
ramoncova06
Specialist III
Specialist III

you need to provide more details for people to be able to help

QlikCommunity Tip: How to get answers to your post?

Anonymous
Not applicable
Author

Thanks Ramon

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Just a plan to follow (if you need code or a script, follow Ramon's advise)

  • Create a resident table that contains a single record for every customer ID and YearMonth combination if that Customer bought something in that month.
  • Order by Customer ID (any order) and by YearMonth (Ascending)
  • Scan the table and compare every record to the previous record: if the Customer IDs don't match (new customer anyway) or the Customer IDs match (same customer) and the previous YearMonth value is more than 6 months before the current YearMonth value, set a NewCustomer flag to 1.

Check QV Desktop Help on peek() and previous() functions for information on how to compare subsequent rows.

Peter

Anonymous
Not applicable
Author

Thanks a lot Peter

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Are you able to turn these steps into a QlikView load script? If not, just ask. It would help however, if you could post an example document with some of your objects and data.

Best,

Peter

Anonymous
Not applicable
Author

A lot of the problem is that I don't fully know where to start. I've got transaction dates and branch names and a customer number.

The way I've built this in excel is to compare the last 6 months transactions to the last months transactions if a customer hasn't bought at a specific branch within the last 6 months but has in the last month then they would be flagged as a new customer to that branch.

I'm wanting then to count these new customer and show them in a bar chart with the dimension being the branch name.

Thanks

Gareth