Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hi
This is probably a basic query but i'm having no luck.
I need a measure to count the number of accounts where the sum of distinct count of products they buy is greater than 1. Distinct count as the customer could buy the same product various times within the date range they select. Basically i need to display the number of customers who buy more than product.
So the results of the below would be 2. Customers 005 is in there twice buy just bought the same product in two different orders.
DATA TABLE | |
ACCOUNT NUMBER | PRODUCT |
001 | A |
001 | B |
002 | A |
002 | B |
002 | C |
003 | A |
004 | A |
005 | A |
005 | A |
Appreciate any help.
Thanks
Solved! Go to Solution.
@STEVE_WT Create a measure to count distinct products per account:
DAX
DistinctProductsPerAccount =
CALCULATE(
DISTINCTCOUNT('Table'[PRODUCT]),
ALLEXCEPT('Table', 'Table'[ACCOUNT NUMBER])
)
Create a measure to count accounts with more than 1 distinct product:
DAX
AccountsWithMoreThanOneProduct =
CALCULATE(
DISTINCTCOUNT('Table'[ACCOUNT NUMBER]),
FILTER(
VALUES('Table'[ACCOUNT NUMBER]),
CALCULATE(DISTINCTCOUNT('Table'[PRODUCT])) > 1
)
)
Proud to be a Super User! |
|
@STEVE_WT Create a measure to count distinct products per account:
DAX
DistinctProductsPerAccount =
CALCULATE(
DISTINCTCOUNT('Table'[PRODUCT]),
ALLEXCEPT('Table', 'Table'[ACCOUNT NUMBER])
)
Create a measure to count accounts with more than 1 distinct product:
DAX
AccountsWithMoreThanOneProduct =
CALCULATE(
DISTINCTCOUNT('Table'[ACCOUNT NUMBER]),
FILTER(
VALUES('Table'[ACCOUNT NUMBER]),
CALCULATE(DISTINCTCOUNT('Table'[PRODUCT])) > 1
)
)
Proud to be a Super User! |
|
Perfect. Thanks for the fast response. Much appreciated.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
6 | |
4 | |
3 | |
3 |
User | Count |
---|---|
11 | |
11 | |
8 | |
8 | |
8 |