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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
diagnosed
Frequent Visitor

Display percentage of values within a single column as a card

I have a column in my table titled "Resolved" ('Table'[Resolved]), which has three values: "TRUE", "FALSE", and (Blank) - I'm trying to build a measure that takes the total count of "TRUE" and "FALSE", finds the percentage of "TRUE", and displays that percentage to a card (i.e. there are 95 "TRUE", 5 "FALSE", and the end result is a card showing "95%").

 

The furthest I've gotten is filtering for "TRUE", and taking that calculation and trying to divide it by COUNTA('Table'[Resolved]) which I'm sure is the wrong way to do it, primarily because it always returns a value of 1.0. 

 

Any guidance or direction is appreciated, as this feels conceptually simple but evades my grasp.

1 ACCEPTED SOLUTION
christianfcbmx
Post Patron
Post Patron

Hi @diagnosed I reorder it my Idea... Make a measure to count FALSE and TRUE and play wiyh the card level filters (One card filtered by False and the otherone by TRUE)... and you will get what you are looking for!

 

TAKE A LOOK AT THE PIC 🙂 the measure is:

 

COUNT TRUE OR FALSE DIVIDED BY TOTAL = 
DIVIDE(COUNTA('TRUE OR FALSE'[TRUE OR FALSE]);
CALCULATE(COUNTA('TRUE OR FALSE'[TRUE OR FALSE]);
ALL('TRUE OR FALSE'[TRUE OR FALSE])))

 

Captura7.JPG

View solution in original post

2 REPLIES 2
christianfcbmx
Post Patron
Post Patron

Hi @diagnosed I reorder it my Idea... Make a measure to count FALSE and TRUE and play wiyh the card level filters (One card filtered by False and the otherone by TRUE)... and you will get what you are looking for!

 

TAKE A LOOK AT THE PIC 🙂 the measure is:

 

COUNT TRUE OR FALSE DIVIDED BY TOTAL = 
DIVIDE(COUNTA('TRUE OR FALSE'[TRUE OR FALSE]);
CALCULATE(COUNTA('TRUE OR FALSE'[TRUE OR FALSE]);
ALL('TRUE OR FALSE'[TRUE OR FALSE])))

 

Captura7.JPG

Not only did that do it, but it did it far cleaner than I was remotely approaching and gives me a far better understanding of how the DIVIDE function can be used. Sincerely, thank you!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.