Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I am working in retail food chain, and I faced with the issue of revealing paired products, like: sausage and bread, cookies and milk, and etc. In other words, revealing products that are mostly sold with another product.
Below, the data structure sample that I have in Power BI:
Purchase_ID | Product_Name |
1 | Milk |
1 | Cookie |
1 | Bread |
2 | Cookie |
3 | Bread |
3 | Cookie |
4 | Milk |
4 | Cookie |
5 | Cookie |
5 | Bread |
5 | Sausage |
6 | Milk |
6 | Cookie |
The result that I would like to reach in the dashboard view is below table:
If selected Product_Name Milk, the result would be below table:
Product name | Number of times |
Milk | 3 |
Cookie | 3 |
Bread | 1 |
Sausage | 0 |
Milk was sold with Milk 3 times in Purchuase_IDs: 1, 4 and 6;
Cookie was sold with Milk 2 times in Purchuase_IDs: 1 and 4;
Bread was sold with Milk 1 time in Purchuase_IDs: 1;
Sausage was not sold with Milk in the same Purchuase_ID, that's why is 0.
I was able to do it in EXCEL, but in Power BI I have not reached the result. The excel steps were:
1. Filter Product_Name column by MILK, and reveal values of Purchuase_ID that include MILK;
2. Remove all filters, add filter to Purchuase_ID column with values that I get in 1 step.
3. Using Count function to reveal number of times of each product that has been sold with MILK.
I look forward for your support.
Any help is appreciated.
Solved! Go to Solution.
@Azizbek , I think you are looking for Market Basket Analysis
https://finance-bi.com/power-bi-basket-analysis/
https://businessintelligist.com/2017/03/27/market-basket-analysis-using-power-bi/
https://www.daxpatterns.com/usecases/market-basket-analysis/
https://www.mssqltips.com/sqlservertip/5428/market-basket-analysis-in-r-and-power-bi/
@Azizbek , I think you are looking for Market Basket Analysis
https://finance-bi.com/power-bi-basket-analysis/
https://businessintelligist.com/2017/03/27/market-basket-analysis-using-power-bi/
https://www.daxpatterns.com/usecases/market-basket-analysis/
https://www.mssqltips.com/sqlservertip/5428/market-basket-analysis-in-r-and-power-bi/
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
49 | |
26 | |
21 | |
15 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
19 | |
18 |