Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Sign up nowGet Fabric certified for FREE! Don't miss your chance! Learn more
Hello,
I am trying to calculate the 'count' column in pBI but am struggling. I need to count the unique number of countries each customer is assigned to, for example John has 4, peter has 1 (Italy).
| Order Number | Customer | Country | Count |
| 1a | John | UK | 4 |
| 2a | David | Mexico | 3 |
| 3a | Peter | Italy | 1 |
| 1b | John | Germany | 4 |
| 2b | David | France | 3 |
| 3b | Peter | Italy | 1 |
| 1c | John | UK | 4 |
| 2c | David | Egypt | 3 |
| 3c | Peter | Italy | 1 |
| 4a | John | Poland | 4 |
Solved! Go to Solution.
@Sammy22 , Try using below mentioned DAX measure
Count = CALCULATE(DISTINCTCOUNT('Table'[Country]), ALLEXCEPT('Table', 'Table'[Customer]))
Proud to be a Super User! |
|
@Sammy22 , Try using below mentioned DAX measure
Count = CALCULATE(DISTINCTCOUNT('Table'[Country]), ALLEXCEPT('Table', 'Table'[Customer]))
Proud to be a Super User! |
|
Thank you! What if i want a date filter too with a date after 2022-01-02? @bhanu_gautam ?
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 12 | |
| 9 | |
| 8 | |
| 8 | |
| 5 |