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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi Guys
Having this table,
I would like to get count of code per Group. (Code has unique values)
Code | Group | Results I would like to get |
101 | Jeans | 2 |
102 | Jeans | 2 |
103 | Suits | 3 |
104 | Suits | 3 |
105 | Suits | 3 |
106 | Shoes | 1 |
Thanks
Solved! Go to Solution.
[# Codes per Group] = // measure
var VisibleGroups = DISTINCT( T[Group] )
var Result =
CALCULATE(
COUNTROWS( T ), // T is your table's name
VisibleGroups,
ALLSELECTED( T )
)
return
Result
[# Codes per Group] = // measure
var VisibleGroups = DISTINCT( T[Group] )
var Result =
CALCULATE(
COUNTROWS( T ), // T is your table's name
VisibleGroups,
ALLSELECTED( T )
)
return
Result
Thank You
User | Count |
---|---|
15 | |
9 | |
8 | |
6 | |
5 |
User | Count |
---|---|
29 | |
18 | |
15 | |
7 | |
6 |