Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Get Customers with sales on each of the last 3 months

Hi!

I have an issue where I need a list o customers with sales on the last 3 months.

For example, if the current Month is November, I need a list of customers with sales in November, October and Setember. He must have sales on each one of the 3 months. If he has sales in one or two of these months, he cannot be considered.

Hope you guys can help me.

Regards,

Gabriel

1 Reply
Vegar
MVP
MVP

Get Customers with sales on each of the last 3 months.PNG

You'll need to do intersect between multiple indirect set analysis modifiers.

I would try something like this:

sum({

<Customer = P({<MonthNo = {'$(#=Max(MonthNo))'}>})>

*<Customer = P({<MonthNo = {$(=Max(MonthNo)-1)}>})>

*<Customer = P({<MonthNo = {$(=Max(MonthNo)-2)}>})

>}Sales)

See attached qvw for example