Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Is someone able to tell me why the below dax measure runs painfully slow? I'm trying to identify the customers (identifier being the BasketID in the sales table) who only purchased 1 product:
Slow Measure:
Solved! Go to Solution.
Hi @Anonymous ,
How about create or var a calculated table and filter the calculated table instead like:
Transactions (Selected Product) Bought 1 Unit =
var tmptable =
SUMMARIZE(
Sales,
Sales[BasketID],
"Total Units Purchased",
[Units Sold (Selected Product)]
)
return
CALCULATE(
[Transactions (Selected Product)],
FILTER(
tmptable,
[Total Units Purchased] = 1
)
)
Best Regards,
Jay
Community Support Team _ Jay Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
How about create or var a calculated table and filter the calculated table instead like:
Transactions (Selected Product) Bought 1 Unit =
var tmptable =
SUMMARIZE(
Sales,
Sales[BasketID],
"Total Units Purchased",
[Units Sold (Selected Product)]
)
return
CALCULATE(
[Transactions (Selected Product)],
FILTER(
tmptable,
[Total Units Purchased] = 1
)
)
Best Regards,
Jay
Community Support Team _ Jay Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you so much! this worked perfectly!
First thing that stands out, it is weird to use a SUMMARIZE in a FILTER. Not saying it is wrong, just not common. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 133 | |
| 88 | |
| 85 | |
| 68 | |
| 64 |