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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
jcatch7
Regular Visitor

How to simply sum counts?

I really new to power bi and still learning the fundamental of DAX

 

I have a table and list of rows of data  and I am  trying to get a SUM of the count of text. Everytime I try and add a measure the sum is incorrect.

 

I have tried everything from Keep Filters to ALL etc. I am trying to get % of the grand total like the attached excel spreadsheet. I exported this data set from power bi. I am trying to recreate what I can create in pivot table in a matrix table but each formula I try to use seem to ignore filters on my visual. Excel Example  

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

 

Untitled.png

 

Ratio: =
VAR _currentcondition =
    COUNTROWS ( Data )
VAR _allcondition =
    CALCULATE ( COUNTROWS ( Data ), REMOVEFILTERS () )
RETURN
    DIVIDE ( _currentcondition, _allcondition )

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

 

Untitled.png

 

Ratio: =
VAR _currentcondition =
    COUNTROWS ( Data )
VAR _allcondition =
    CALCULATE ( COUNTROWS ( Data ), REMOVEFILTERS () )
RETURN
    DIVIDE ( _currentcondition, _allcondition )

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
HotChilli
Super User
Super User

If you drag agreementdraftname and Count of franchiseeagreementstatusname on to a table visual , you can make the second one have an option of Show Value as -> percent of grand total (You set this in the field values well where you select the aggregation). So this will be a table visual.

If you want it like the attached excel sheet, use a matrix visual

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.