2 Replies Latest reply on Jan 30, 2017 12:32 PM by Christopher Demundo

# Set based on another dimension

I'm looking to track a set of customers based on a specific invoice.

For any customer that has an invoice where number of units is greater than or equal to 4, I'd like to group those customers into a set.  I then want to use that "Customers with invoices >= 4" set so I can track future sales from those customers.

Attached a workbook with an example of the data I'm looking at

• ###### 1. Re: Set based on another dimension

hi Christopher,

So one way to do this is with LoDs...which have the same effect as a set (in that we can create them at one level...invoice/customer and then return the result to all rows for that customer). I've broken it down to 2 formulas to help the explanation (but you can nest this into 1 if you like)

so first I want a dimension that flags of an invoice SUM of units is >= 4

[Flag Invoice Units >= 4]

IF {FIXED [Invoice Number], [Customer Number (Customers Extract)]: SUM([Number of Units])}>=4 THEN 1 ELSE 0 END

and then I can take the MAX of this (by customer) to flag those with at least 1 invoice hitting the above criteria

[Flag Customer]

{FIXED [Customer Number (Customers Extract)]: MAX([Flag Invoice Units >= 4])}=1

hope that makes sense, but let me know if not.

• ###### 2. Re: Set based on another dimension

Thank you Simon, this was very helpful