Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Count new customers per month by expression

Hi guys,

Is there a way to calculate the number of new customers per month by expression.

During business rules I cant change the scripting, so I need to calculate the number of new customers per month by expression.

Is there someone who could help me with this?

Thnx!

8 Replies
vinieme12
Champion III
Champion III

see this post

New customer analysis using set analysis

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
vinieme12
Champion III
Champion III

or see my sample app here

Re: Nested Set Analysis - Customer bought in both time periods

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Anonymous
Not applicable
Author

Hi Vineeth,

Thanks for your quick reply, but it seems like its not working. used your sample app....

Here's the table with and calculations:

New Customers: =count({< %KUNNR_Key = e({<calendar.Year -={'2017'}>}%KUNNR_Key) >} distinct %KUNNR_Key)

Lost Customers: =count({< %KUNNR_Key ={"=min(TOTAL <%KUNNR_Key> Year)=2017"} >} distinct %KUNNR_Key)

All Customers:  =Count( DISTINCT %KUNNR_Key)

Can you give me some advice whats going wrong??


vinieme12
Champion III
Champion III

can you post a sample app?

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Anonymous
Not applicable
Author

Heres the sample

vinieme12

Would be superb if you could fix the calculations.

vinieme12
Champion III
Champion III

what is the expected output? also what is the logic that you are trying to implement

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
vinieme12
Champion III
Champion III

what i could spot was incorrect field name in red below

Lost Customers: =count({< %KUNNR_Key ={"=min(TOTAL <%KUNNR_Key> calendar.Year)=2017"} >} distinct %KUNNR_Key)


Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Anonymous
Not applicable
Author

New customers : Count the number of customer which placed their first order in this month

Lost customers : Count the number of customers which didnt placed an order in the current month, but placed their last order in the previous month

Amount New customers: The total amount of turnover brought by New Customers

This should be the outcome