Forum Discussion
Segmentation based on Product List available for each Customer
- 5 months ago
HI ShaileshKT ,
Yes, it is possible to achieve this using a calculated measure even when CustomerID and ProductID are present in different tables, provided the tables are properly related in the data model. I have successfully reproduced your requirement using the Bridge-based model .
This can be achieved by:
-
Creating separate Customer and Product tables
-
Using a bridge/fact table that contains the mapping between CustomerID and ProductID
-
Creating relationships between these tables in the model view
-
Building the segmentation logic as a measure that evaluates the related product combinations for each customer
So, you do not necessarily need to create a single combined table if the relationships are configured correctly.
If you face any difficulty while implementing it in your model, please feel free to reach out to us. We are happy to assist..
Please check out the .pbix file provided
Best Regards,
Abdul Rafi
-
Thank you v-moharafi-msft for your solution. I wanted to check if it is possible to achieve using calculated measure as my customerID and ProductID columns are available in two different tables.
Also, there is one change in the requirement. In the sample data, I have provided mandatoary product list. There might chances that for Customer1 has other product assigned apart from Product1 to Product8.
The segmentation defination are as follow:
Segmet1= IF any Customer has Product1 to Product8 then that assigned Segment1
Segment2=IF any Customer has Product1 to Product4, Product7 and Product8 then assigned Segment2
Segment2=IF any Customer has Product2, Product4 and Product7 then assigned Segment3
Below the sample data.
| CustomerID | ProductID | Expected Segment | ProductlistSegmentation |
| Customer1 | Product1 | Segment1 | Mandatory |
| Customer1 | Product2 | Segment1 | Mandatory |
| Customer1 | Product3 | Segment1 | Mandatory |
| Customer1 | Product4 | Segment1 | Mandatory |
| Customer1 | Product5 | Segment1 | Mandatory |
| Customer1 | Product6 | Segment1 | Mandatory |
| Customer1 | Product7 | Segment1 | Mandatory |
| Customer1 | Product8 | Segment1 | Mandatory |
| Customer1 | Product9 | Segment1 | Optional |
| Customer1 | Product10 | Segment1 | Optional |
| Customer1 | Product11 | Segment1 | Optional |
| Customer1 | Product12 | Segment1 | Optional |
| Customer2 | Product1 | Segment2 | Mandatory |
| Customer2 | Product2 | Segment2 | Mandatory |
| Customer2 | Product3 | Segment2 | Mandatory |
| Customer2 | Product4 | Segment2 | Mandatory |
| Customer2 | Product7 | Segment2 | Mandatory |
| Customer2 | Product8 | Segment2 | Mandatory |
| Customer2 | Product13 | Segment2 | Optional |
| Customer2 | Product14 | Segment2 | Optional |
| Customer2 | Product15 | Segment2 | Optional |
| Customer3 | Product2 | Segment3 | Mandatory |
| Customer3 | Product4 | Segment3 | Mandatory |
| Customer3 | Product7 | Segment3 | Mandatory |
| Customer3 | Product10 | Segment3 | Optional |
| Customer3 | Product13 | Segment3 | Optional |
| Customer3 | Product15 | Segment3 | Optional |
Thank you in advance
Best regards
Hi ShaileshKT ,
I have reproduced your updated scenario with both Mandatory and Optional products, and I was able to achieve the expected result successfully.
Based on your requirement, the segmentation logic checks only the mandatory product combinations required for each segment, while any additional optional products assigned to the customer are ignored and do not impact the segment assignment.
The expected segmentation was achieved successfully for:
-
Segment1 = Customers having Product1 to Product8
-
Segment2 = Customers having Product1 to Product4, Product7, and Product8
-
Segment3 = Customers having Product2, Product4, and Product7
Additional optional products do not affect the segment assignment.
Please go through the attached PBIX file and screenshots provided below.
Best Regards,
Abdul Rafi