Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
SDT
Contributor III
Contributor III

Master Dimension for Quadrant Analysis

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.

 

Labels (1)
1 Solution

Accepted Solutions
jbhappysocks
Creator II
Creator II

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)

View solution in original post

3 Replies
sidhiq91
Specialist II
Specialist II

@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.

jbhappysocks
Creator II
Creator II

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
Contributor III
Contributor III
Author

That did it @jbhappysocks !

 

Thank you.