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!View all the Fabric Data Days sessions on demand. View schedule
Hi Team,
I am having table with two fileds :
| Name | Planid |
| A | 1 |
| A | 2 |
| B | 1 |
| c | 1 |
| c | 2 |
| c | 3 |
Need to calculate count in measure like below screen shot
| Name | Planid | Count |
| A | 1 | 2 |
| A | 2 | 2 |
| B | 1 | 1 |
| c | 1 | 3 |
| c | 2 | 3 |
| c | 3 | 3 |
Hi @Anonymous
Try this measure:
Count =
CALCULATE ( COUNT ( 'Table'[Name] ), ALL ( 'Table'[Planid] ) )If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos ✌️!!
This is giving count of names but i need count of distinct planid for each name like below (Count column is expected)
| Name | Planid | Count |
| A | 1 | 2 |
| A | 2 | 2 |
| B | 1 | 1 |
| c | 1 | 2 |
| c | 2 | 2 |
| c | 2 | 2 |
Hi @Anonymous
Try this measure:
Count =
CALCULATE ( DISTINCTCOUNT( 'Table'[Planid] ), ALLEXCEPT( 'Table','Table'[Name]))
Output:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos✌️!!
Hi @Anonymous ,
Try this measure:
Count= CALCULATE(COUNT(Table[Name]), ALL(Table[Planid]))
Thanks
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 13 | |
| 11 | |
| 9 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 28 | |
| 20 | |
| 20 | |
| 19 | |
| 12 |