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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
jaduncan0515
Frequent Visitor

Getting percentage of rows with a certain value in one column for a card visual

This seems like it should be relatively simple, but I am struggling with it.

 

I have one table that looks like the below (the blanks are intentional):

Project IDProject TypeStatusDiverse
1AActiveYes
2AComplete Yes
3BComplete No
4CActiveYes
5APendingNo
6APending 

 

The page I want the card visual on has the below filters which I want to keep for the card visual:

Page Filters
Project Type = "A"
Status = "Active" or "Complete"

 

I need to return this value for the visual after all the filters (50% is taken from the dummy data in the table above):

Result Needed
% of rows where Diverse = "Yes" = 50%
1 ACCEPTED SOLUTION
gmsamborn
Super User
Super User

Hi @jaduncan0515 

 

Would a measure like this help?

Pct Diverse = 
VAR _All = COUNTROWS( 'Table' )
VAR _Diverse =
    CALCULATE(
        COUNTROWS( 'Table' ),
        'Table'[Diverse] = "Yes"
    )
VAR _Result = 
    DIVIDE(
        _Diverse,
        _All
    )
RETURN
    _Result

Pct Diverse.pbix

 

Let me know if you have any questions.



Proud to be a Super User!

daxformatter.com makes life EASIER!

View solution in original post

2 REPLIES 2
gmsamborn
Super User
Super User

Hi @jaduncan0515 

 

Would a measure like this help?

Pct Diverse = 
VAR _All = COUNTROWS( 'Table' )
VAR _Diverse =
    CALCULATE(
        COUNTROWS( 'Table' ),
        'Table'[Diverse] = "Yes"
    )
VAR _Result = 
    DIVIDE(
        _Diverse,
        _All
    )
RETURN
    _Result

Pct Diverse.pbix

 

Let me know if you have any questions.



Proud to be a Super User!

daxformatter.com makes life EASIER!

Worked like a charm. Thank you very much!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.

Top Solution Authors