Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
gloria_bertini
Creator
Creator

Get New Customer and uneventful customers

Good morning everybody,

First of all sorry for my English.

I have a problem to find  new customer for a season and uneventful customers for a season.

New customer are customer that have do orders in this season but non in the previous two while uneventful customers are customers that do orders in previous season but not in the season in exam.

The idea is to create a table in script with all the customer and the season in where a customer do an order and than see if a customer have done order in one season but not in previous.

I do this table:

STAGIONI_DI_ACQUISTO:

LOAD Distinct

CodeCustomer,

CodeSeason;

SQL SELECT *

FROM …;  //This table is taken from the file of orders

left Join

LOAD

Code Season,

IndexSeason,  //a field that give sequence of season

// ApplyMap('MAPPING_STAGIONI',IndexSeason -1,'MANCA DESCRIZONE') as CodiceStagionePrec1,

// ApplyMap('MAPPING_STAGIONI', IndexSeason -2,'MANCA DESCRIZONE') as CodiceStagioneLike1;

SQL SELECT *

FROM ……; // This table is taken from the file of season

Now I don’t know how to procced to count new customer.

I tried lot of different way but nothings works.

Maybe it’s also possible with set analysis, but I don’t know how do this.

Please help me

Thanks in advice

16 Replies
agigliotti
Partner - Champion
Partner - Champion

yes I see it however what about the result you get ?

gloria_bertini
Creator
Creator
Author

The result is 0, and this is a screenshot of a pivot table with dimension season and measure: !

=count( {< CodiceCliente1 = P( {< IndiceStagione1 = {"$(=Concat( distinct IndiceStagione1,','))"} >} ) *

E( {< IndiceStagione1 = {">=$(=Concat( distinct IndiceStagione1,',')-2)<=$(=Concat( distinct IndiceStagione1,',')-1)"} >} ) >} distinct CodiceCliente1 )

!Immagine2.png

agigliotti
Partner - Champion
Partner - Champion

for this to work you have to select only one value for season field.

gloria_bertini
Creator
Creator
Author

The result is always 0

agigliotti
Partner - Champion
Partner - Champion

at this point I can't help you further without a sample qvf file to work with.

gloria_bertini
Creator
Creator
Author

Thanks the same,

unfortunately I can’t post qvf for privacy reasons.

I will try to fix the problem from the script.

gloria_bertini
Creator
Creator
Author

I solved the problem using the solution proposed in this thread: set-analysis lost customers

Thanks all for help