Market Basket Analysis
Hi! I'm doing a Market Basket Analysis in Power BI. I'm not well versed in DAX so I was wondering what is the equivalence of this SQL Code in DAX:
SELECT order_id, COUNT(product_id), product_name
FROM products p
INNER JOIN order_products_train ot
ON ot.product_id = p.product_id
GROUP BY order_id
So basically, I want to count the frequencies of each product in an order
Any thoughts?
COUNT(product_id), because that will always be 1, given your currentGROUP BY. You probably intended to group only by theorder_id. - Tim Biegeleisen