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
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 ?
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 12 | |
| 10 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 31 | |
| 28 | |
| 19 | |
| 11 | |
| 10 |