Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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)
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)
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.).