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!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hello,
I am a newbie integrating Power BI at my workplace. Could you please help with a query to sum/count based on multiple criteria.
I have a data set of each customer and Sales rep assigned to that customer and number of sales units sold to each customer.
I want a column that has Count of sales units >=1 sold - rolled up by each sales Rep - though the data set has rows for each customer. Table should be as shown below. Please see example below.
IE - JEFF has 2 customers where units sold >=1
Sales Rep - Customer - Units Sold - Count of Sales units >1 (ALL Customers of that sales rep)
JEFF - ABC 3 - 2
Dave - XYZ 1 - 1
JEFF - BNM 7 - 2
Thanks for your help!
Solved! Go to Solution.
Hi @Anonymous,
Please create a calculated column with below formula:
Count of Sales Unit =
CALCULATE (
DISTINCTCOUNT ( Table[Customer] ),
FILTER ( ALLEXCEPT ( Table, Table[Sales Rep] ), Table[Units Sold] >= 1 )
)
Best regards,
Yuliana Gu
Hi @Anonymous,
Please create a calculated column with below formula:
Count of Sales Unit =
CALCULATE (
DISTINCTCOUNT ( Table[Customer] ),
FILTER ( ALLEXCEPT ( Table, Table[Sales Rep] ), Table[Units Sold] >= 1 )
)
Best regards,
Yuliana Gu
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 53 | |
| 47 | |
| 32 | |
| 16 | |
| 15 |
| User | Count |
|---|---|
| 86 | |
| 71 | |
| 38 | |
| 28 | |
| 25 |