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
I have created two different mesaures to have overall count and TypeCount by grouping.
Mesaure :
Raw Data :
| Product | Type |
| A | X |
| B | Y |
| C | Z |
| D | X |
| E | X |
Expected Output in Table/Matrix :
| Type | TypeCount | Overall Total | % of Total |
| X | 3 | 5 | 60 |
| Y | 1 | 5 | 20 |
| Z | 1 | 5 | 20 |
But getting Output in Table/Matrix when adding the Type :
| Type | TypeCount | Overall Total | % of Total |
| X | 3 | 3 | 100 |
| Y | 1 | 1 | 100 |
| Z | 1 | 1 | 100 |
Can you please help me to acheive my desired output
Hi @Anonymous ,
Here are the steps you can follow:
Single group statistics::
1. Create calculated table.
Table =
var _count1=COUNT('Row Data'[Type])
var _1=COUNTX(ALL('Row Data'),'Row Data'[Type])
var _2=
SUMMARIZE('Row Data','Row Data'[Type],
"Type Count",COUNT('Row Data'[Type]),
"Overall",COUNTX(ALL('Row Data'),'Row Data'[Type]))
return _22. Create calculated column.
percen = DIVIDE('Table'[Type Count],'Table'[Overall])3. Result.
Multiple statistical groups:
1. Create calculated table.
Table 2 =
var _count1=COUNT('Row Data'[Type])
var _1=COUNTX(ALL('Row Data'),'Row Data'[Type])
var _2=
SUMMARIZE('Row Data','Row Data'[Week],'Row Data'[Type],
"Type Count",COUNT('Row Data'[Type]),
"Overall",COUNTX(ALL('Row Data'),'Row Data'[Type]))
return _22. Create calculated column.
Percen =
DIVIDE('Table 2'[Type Count],'Table 2'[Overall])3. Result.
You can downloaded PBIX file from here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous ,
I am getting the expected results
Measure = count('Table (3)'[Type])
Measure 2 = CALCULATE(count('Table (3)'[Type]), ALL('Table (3)'[Type]))
Percen = DIVIDE([Measure],[Measure 2])
Can you please help me to get the correct count when grouping by more than 1 column
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 |
|---|---|
| 57 | |
| 44 | |
| 42 | |
| 20 | |
| 18 |