Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
Hello,
I have a table named XYZ and columns A and B as below -
| A | B |
| Delhi | 1 |
| Delhi | 2 |
| Delhi | 3 |
| Mumbai | 1 |
| Jaipur | 2 |
| Jaipur | 3 |
| Hyderabad | 1 |
| Chennai | 2 |
| Nagpur | 3 |
| Nagpur | 4 |
I need count of column B grouped by A as below -
| A | Count of B |
| Delhi | 3 |
| Mumbai | 1 |
| Jaipur | 2 |
| Hyderabad | 1 |
| Chennai | 1 |
| Nagpur | 2 |
and then need to show the Count of B > 1 in a tile in power bi. Could anyone please help me with this using DAX formula ?
Here result would be 3.
This is very easy in SQL but I am struggling in Power BI.
Thanks in advance !!
Solved! Go to Solution.
You can try this DAX to get your result:
Count_B_Greater_Than_1 =
CALCULATE(
COUNTROWS(
FILTER(
SUMMARIZE('Table', 'Table'[A], "Count_B", COUNT('Table'[B])),
[Count_B] > 1
)
)
)
Best Regards,
Muhammad Yousaf
If this post helps, then please consider "Accept it as the solution" to help the other members find it more quickly.
Thank you for helping so quickly 🙂 I really apreciate your efforts on this.
You can try this DAX to get your result:
Count_B_Greater_Than_1 =
CALCULATE(
COUNTROWS(
FILTER(
SUMMARIZE('Table', 'Table'[A], "Count_B", COUNT('Table'[B])),
[Count_B] > 1
)
)
)
Best Regards,
Muhammad Yousaf
If this post helps, then please consider "Accept it as the solution" to help the other members find it more quickly.
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 23 | |
| 23 | |
| 21 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 58 | |
| 53 | |
| 42 | |
| 30 | |
| 24 |