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: 
bigmike7
Contributor II
Contributor II

Count the number of customers who have greater then 10 sales

looking for a set analysis that will count the number of customers with greater then or equal to 10 sales in a given month for a line chart.

what I think it would look like is something like:

=count({$<

MONTH_INDEX={">=$(=vTimeCEnd-28)<=$(=vTimeCEnd-0)"},

ANALYSIS_PRODUCT_GROUP = {'<<Product>>'},

$(Sum({$<MONTH_INDEX={">=$(=vTimeCEnd-28)<=$(=vTimeCEnd-0)"},

ANALYSIS_PRODUCT_GROUP = {'<<Product>>'},

>

SALES) >=10))

>}

DISTINCT

CUSTOMER_ID)

2 Replies
sunny_talwar

I am not sure what you are trying to do with your expression, but you can try something like this:

Count(DISTINCT {<CUSTOMER_ID = {"$(=Count({<MONTH_INDEX={">=$(=vTimeCEnd-28)<=$(=vTimeCEnd-0)"}, ANALYSIS_PRODUCT_GROUP = {'<<Product>>'}>}SALES) >= 10)"}>} CUSTOMER_ID)

swuehl
MVP
MVP

I am not sure what 10 Sales should be, is it  like 10 ($?) sales amount or 10 times sales invoiced?

Your set expression does not look like valid syntax, especially this part

$(Sum({$<MONTH_INDEX={">=$(=vTimeCEnd-28)<=$(=vTimeCEnd-0)"},

ANALYSIS_PRODUCT_GROUP = {'<<Product>>'},

>

SALES) >=10))




Are you missing some text parts here in the copy & pasted expression?

Since set analysis is evaluated once per chart, not per dimension line, you can't expect the set analysis to filter the customers with "10 sales" per month, if month is your dimension (unless using some more advanced set expression with an appropriate key field).

I think it would be best if you post a small, simplified sample QVW that shows where you are coming from.

And if possible, add also a description of your expected result (a sketch drawing, excel table etc.).