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

Announcements
Discover the Trends Shaping AI in 2026: Register Here!
cancel
Showing results for 
Search instead for 
Did you mean: 
VatsalyaSolanki
Contributor III
Contributor III

New Customers for Selected Quarter

I have a table like

CustomerName   Date

A                               01/04/2018

B                              01/05/2023

C                            01/06/2023

A                              01/06/2023

B                              01/06/2023

 

I want to show count of new customers for this quarter.  [New Customer = Customers existing in this quarter and not existing in previous quarter ]

Eg : New customers for Q1 2023 will be C and B   |  Old customer will be A

 

Thanks in Advance

Accept as answer, if the solution works for you.
Labels (4)
1 Solution

Accepted Solutions
Gabbar
Specialist
Specialist

Prepare Quarter Start Date and lets name it :- vquarterstart in Charts variable:-
then in set expression use the measure:-
Count({<Date={">=$(=vquarterstart)"},CustomerName = e({<Date={"<$(=vquarterstart)"}>})>}CustomerName)


In the variable You can use:-
vquarterstart =  addmonths(yearstart(max(Date)),3*(floor((num(month(Max(Date)))-1)/3)))
Or If you have have new version of qlik
you can use
vquarterstart = quarterstart(max(Date))

View solution in original post

2 Replies
Gabbar
Specialist
Specialist

Prepare Quarter Start Date and lets name it :- vquarterstart in Charts variable:-
then in set expression use the measure:-
Count({<Date={">=$(=vquarterstart)"},CustomerName = e({<Date={"<$(=vquarterstart)"}>})>}CustomerName)


In the variable You can use:-
vquarterstart =  addmonths(yearstart(max(Date)),3*(floor((num(month(Max(Date)))-1)/3)))
Or If you have have new version of qlik
you can use
vquarterstart = quarterstart(max(Date))

VatsalyaSolanki
Contributor III
Contributor III
Author

Thankyou Akash  for the solution, that worked well.

Accept as answer, if the solution works for you.