Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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))
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))
Thankyou Akash for the solution, that worked well.