Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a data set with a range of customers and a range of products along with other measures and dimensions.
I have classified a subset of customers as either "A" or "B" and a subset of products as "A" or "B".
Products and customers are related to each other on orders.
I need to classify all combinations of customer and products (only when both have an A or B) into quadrants:
AA
AB
BA
BB
I tried several versions of a master measure and am getting results where the quadrant contains only one letter.
Here is one example I tried:
AGGR({1<CustomerAB={'A','B'}, ProductAB={'A','B'}>}
DISTINCT CustomerAB&ProductAB, Customer,Product)
I need to be able to set the quadrant regardless of other selections (hence the 1<> set analysis). The definitions of A or B are done in the load script independently for customer and for product.
Any help would be greatly appreciated.
Hi, maybe there is an easier way to do it, but I think adding Only to your Aggr should do it?
AGGR({1<CustomerAB={'A','B'}, ProductAB={'A','B'}>}
DISTINCT Only(CustomerAB)&Only(ProductAB), Customer,Product)
@SDT Could you please post some sample data and expected output? that way it will help us to understand better and come up with a solution.
Hi, maybe there is an easier way to do it, but I think adding Only to your Aggr should do it?
AGGR({1<CustomerAB={'A','B'}, ProductAB={'A','B'}>}
DISTINCT Only(CustomerAB)&Only(ProductAB), Customer,Product)