Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
I have a table with me which has a column of category names. I need to get the count of every category and the percentage of the category with total in a visual table/matrix. For example, like this
| Products | nos | Percent |
| A | 3 | 18.75% |
| B | 4 | 25.00% |
| C | 3 | 18.75% |
| D | 3 | 18.75% |
| E | 3 | 18.75% |
| Total | 16 | 100.00% |
Please guide me with a solution
Solved! Go to Solution.
Sorry, I thought "nos" was an actual field.
Try:
Count Products =
COUNT('Table'[PRODUCTS])% Over totals =
DIVIDE (
[Count Products],
CALCULATE ( [Count Products], ALL ( 'Table'[PRODUCTS] ) )
)
Proud to be a Super User!
Paul on Linkedin.
The ID column will not affect the calculations
Proud to be a Super User!
Paul on Linkedin.
Thanks a lot for the solution.
Try
% over total =
DIVIDE (
SUM ( Table[nos] ),
CALCULATE ( SUM ( Table[nos] ), ALL ( Table[Products] ) )
)
Proud to be a Super User!
Paul on Linkedin.
Hi, Why should I need to do sum? I need the count value.
the nos column is the count of every category.
lets say that my column is like this
| PRODUCTS |
| A |
| A |
| A |
| B |
| B |
| B |
| B |
| C |
| C |
| C |
| D |
| D |
| D |
| E |
| E |
| E |
from this, I wan to get the count of every category and also the percentage. like this in table / matrix visual
| Products | nos | Percent |
| A | 3 | 18.75% |
| B | 4 | 25.00% |
| C | 3 | 18.75% |
| D | 3 | 18.75% |
| E | 3 | 18.75% |
| Total | 16 | 100.00% |
Sorry, I thought "nos" was an actual field.
Try:
Count Products =
COUNT('Table'[PRODUCTS])% Over totals =
DIVIDE (
[Count Products],
CALCULATE ( [Count Products], ALL ( 'Table'[PRODUCTS] ) )
)
Proud to be a Super User!
Paul on Linkedin.
This helps a lot. But I got another doubt. What if I have ID column which has duplicate values like this
| id | PRODUCTS |
| 1 | A |
| 1 | A |
| 2 | A |
| 2 | B |
| 3 | B |
| 3 | B |
| 4 | B |
| 5 | C |
| 6 | C |
| 7 | C |
| 8 | D |
| 8 | D |
| 9 | D |
| 10 | E |
| 11 | E |
| 12 | E |
if this is the table, I should be doing distinct count ?
please guide me with a logic
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 40 | |
| 37 | |
| 32 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 66 | |
| 58 | |
| 31 | |
| 25 | |
| 24 |