Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
jayasurya_prud
Helper II
Helper II

Calculation in table

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

ProductsnosPercent
A318.75%
B425.00%
C318.75%
D318.75%
E318.75%
Total16100.00%


Please guide me with a solution

1 ACCEPTED 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] ) )
)

count.png

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

6 REPLIES 6
PaulDBrown
Community Champion
Community Champion

The ID column will not affect the calculations 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






jayasurya_prud
Helper II
Helper II

Thanks a lot for the solution.

PaulDBrown
Community Champion
Community Champion

Try

% over total =
DIVIDE (
    SUM ( Table[nos] ),
    CALCULATE ( SUM ( Table[nos] ), ALL ( Table[Products] ) )
)




Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

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

 

ProductsnosPercent
A318.75%
B425.00%
C318.75%
D318.75%
E318.75%
Total16100.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] ) )
)

count.png

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

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

idPRODUCTS
1A
1A
2A
2B
3B
3B
4B
5C
6C
7C
8D
8D
9D
10E
11E
12E

 

if this is the table, I should be doing  distinct count ?

 

please guide me with a logic

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.