Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
PatricioM
Contributor
Contributor

Grouping depending on transactions

Hello all,

I am working in this analysis where I need to identify new customers (buying for the first time, with no previous record) but for different periods of time.

[Fecha NV] - Date of the transaction

[Rut Cliente] - Customer ID

[NV] - Sales ID

I want to know how many are "new" customers or had their first [NV] for the current year.

 

I am working on something like this:

AGGR(Count({1<
[Tipo_Nota_Venta]={'Nuevos'},
[Fecha NV]= {"$(='>=' & Addmonths(Yearstart(Max([Fecha NV])),0) & '<=' & Addmonths(Monthend(Max([Fecha NV])),0))"}
>}[NV]),[Rut Cliente])

 

Please give me some ideas on how to approach this.
Thanks,

Patricio

 

1 Reply
PatricioM
Contributor
Contributor
Author

Got it. Just reviewed past posts regarding "new customers"

 

Count(distinct{<
[Tipo_Nota_Venta]={'Nuevos'},
[Rut Cliente]=E({<[Fecha NV]={"$(='' & '<' & Addmonths(Yearstart(Today()),0))"}>}),
[Fecha NV]= {"$(='>=' & Addmonths(Yearstart(Today()),0) & '<=' & Addmonths(Monthend(Today()),0))"}
>}[Rut Cliente])