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.
Hi everyone,
the question is a bit tricky. I want to know the best couple of products sold to the costumers. I think it could be clearer if I post an image:
Do you have some suggestion to solve it with dax?
Thanks
Solved! Go to Solution.
Hi @franctambu ,
We can use two ways to meet your requirement.
The first way is to create a merge table.
1. In Power Query Editor, we can merge the same table to get a new table.
2. Then we can add a customer to combine the product column.
3. At last we can filter the customer as XY, XZ, YZ.
The second way is to create a new table and a measure.
1. Create a new table using Enter data and create two columns in it.
Column1 = LEFT('check table'[Rank],1)
Column2 = RIGHT('check table'[Rank],1)
2. Then we need to create a new custom column using Power Query Editor to combine each product.
3. At last we can create a measure to get the result.
VALUE =
COUNTROWS (
FILTER (
'Product',
SEARCH ( MAX ( 'check table'[Column1] ), 'Product'[Pro], 1, 0 ) > 0 && SEARCH ( MAX ( 'check table'[Column2] ), 'Product'[Pro], 1, 0 ) > 0
))
If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?
BTW, pbix as attached.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @franctambu ,
We can use two ways to meet your requirement.
The first way is to create a merge table.
1. In Power Query Editor, we can merge the same table to get a new table.
2. Then we can add a customer to combine the product column.
3. At last we can filter the customer as XY, XZ, YZ.
The second way is to create a new table and a measure.
1. Create a new table using Enter data and create two columns in it.
Column1 = LEFT('check table'[Rank],1)
Column2 = RIGHT('check table'[Rank],1)
2. Then we need to create a new custom column using Power Query Editor to combine each product.
3. At last we can create a measure to get the result.
VALUE =
COUNTROWS (
FILTER (
'Product',
SEARCH ( MAX ( 'check table'[Column1] ), 'Product'[Pro], 1, 0 ) > 0 && SEARCH ( MAX ( 'check table'[Column2] ), 'Product'[Pro], 1, 0 ) > 0
))
If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?
BTW, pbix as attached.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@franctambu , see Market Basket Analysis can help
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 |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |