Forum Discussion
Grouping overlapping
Hello
I have the data:
| Attribute1 | Attribute2 | Attribute3 | |
| Product1 | 1 | 2 | 3 |
| Product2 | 2 | 3 | 4 |
| Product3 | 3 | 4 | 5 |
| Product4 | 4 | 5 | 6 |
I want to group it with custom criteria i.e.:
Group1 = Attribute1>2 and Attribute2>2
Group2 = Attribute1>1 and Attribute3>3
You will notice that e.g. Product3 belongs to both Group1 and Group2
I then want to count each Group members regardless if they belong to more than one groups.
What would be the ideal data structure to do that?
I was thinking a Column that will calculate the Group1, Group2 values for each Product but it will need to be concatenated and it will not be easy to pivot it.
Any ideas?
Thanks!
Hi Anonymous
You can add two calculated colum with the following codes to the table:
Group1 = IF('Table (2)'[Attribute1]>2&&'Table (2)'[Attribute2]>2,1,0)Group2 = IF.EAGER('Table (2)'[Attribute1]>1&&'Table (2)'[Attribute3]>3,1,0)Output will be like this:
then you can use these columns to find the count of group 1 and 2 (just sum the value in those columns)
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
2 Replies
- VahidDMSuper User
Hi Anonymous
You can add two calculated colum with the following codes to the table:
Group1 = IF('Table (2)'[Attribute1]>2&&'Table (2)'[Attribute2]>2,1,0)Group2 = IF.EAGER('Table (2)'[Attribute1]>1&&'Table (2)'[Attribute3]>3,1,0)Output will be like this:
then you can use these columns to find the count of group 1 and 2 (just sum the value in those columns)
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/ - Ashish_MathurSuper User
Hi,
Please show the end result that you are expecting.