Forum Discussion
jamieee0810
4 years agoRegular Visitor
Re-Evaluating Minimum Based on Selection
Hi Guys, I'm not new to Power BI, but this problem is making me feel like it, so I thought i'd reach out to people smarter than me to get some assistance! I've tried looking around the forums, bu...
lbendlin
Super User
4 years agoALLEXCEPT is a rather blunt tool. You may want to use REMOVEFILTERS instead.
How are you "filtering out certain sellers" ? Page level filter? Disconnected slicer?
Are you assuming that each seller is only selling products once on each day? What would happen if Seller A sold item AB123 once for 15 and once for 14 - on the same day ?
On a general note - not sure you are aware but your issue is anything but simple. It involves severe pointer gymnastics, going from a seller to the products they sold to the sellers who sold these products to the minimum to a comparison. No wonder this has you stumped for a while.
Cheapest =
var a = SUMMARIZE('Table',[Item],"mp",min('Table'[Price]))
var b = ADDCOLUMNS(a, "cmp",CALCULATE(min('Table'[Price]),REMOVEFILTERS('Table'[Seller])))
var c = filter(b,[cmp]=[mp])
return countrows(c)