Hi I need to count the orders with one Item (Product) only to take it’s percentage out of the total orders with at least 2 different Items combination in the same order how can I do that?
Also How can we summing up the Total sales of Orders with one Item only?
I attached pbix sample.
Uploading: Basket analysis - Optimized for unplugged.pbix…
Hi @MAAbdullah47,
Can you attacht the file again? Think something went wrong…
Thanks
Hi @Melissa , I attached it.
You can use the order number to count the orders.
Book1.xlsx (8.9 KB)
Hi @Melissa , I’m also attaching sample of the Idea in excel sheet.
Hi @MAAbdullah47,
Give something like this a go.
One Sales order line =
COUNTROWS(
FILTER(
ADDCOLUMNS( SUMMARIZE( Sales, Sales[Order Number],'Date'[Date]),
"max lines", CALCULATE( COUNTROWS( Sales ), ALLEXCEPT( Sales, Sales[Order Number],'Date'[Date] ))
), [max lines] =1
)
)
and for sales, just change into SUMX with [Sales Amount]
One Sales order line value =
SUMX(
FILTER(
ADDCOLUMNS( SUMMARIZE( Sales, Sales[Order Number],'Date'[Date]),
"max lines", CALCULATE( COUNTROWS( Sales ), ALLEXCEPT( Sales, Sales[Order Number],'Date'[Date] ))
), [max lines] =1
), [Sales Amount]
)
I hope this is helpful
2 Likes
Hi @Melissa
Thank you for the response the solution is work successfully 100% but what if we need to do the same concept with (And Product) instead of (Product) :
(And Product) have inactive relationship I tried Userelationship but it doesn’t work do you have any other suggestion?