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
Anonymous
Not applicable

Calculate percentage of the total

Hey,

 

I would like to calculate a percentage of the total. Like you can see in the picture the last row has a 1 or a 0. I want to know how many times it gives 1 as result and compare this to the total amount of rows. So I get a percentage out of it. 
The result in this example must give: 53% (8 times 1 / the total 15)

 

timob_0-1651758264555.png

Thanks for helping!

 

1 ACCEPTED SOLUTION
isabella
Employee
Employee

Hi @Anonymous 

I did a local test ,hope this helps.

 

isabella_0-1652086627717.png

create a measure :

measurepecentage = CALCULATE(COUNTROWS('tabletest') ,FILTER('tabletest',[voorbeeld(0/1)]="1"))/CALCULATE(COUNTROWS('tabletest'),ALL('tabletest'))

isabella_1-1652086740256.png

set the measure format:

isabella_2-1652086880909.png

 

use the measure in a card :

isabella_3-1652086901153.png

Best Regards,

Community Support Team _Isabella

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

2 REPLIES 2
isabella
Employee
Employee

Hi @Anonymous 

I did a local test ,hope this helps.

 

isabella_0-1652086627717.png

create a measure :

measurepecentage = CALCULATE(COUNTROWS('tabletest') ,FILTER('tabletest',[voorbeeld(0/1)]="1"))/CALCULATE(COUNTROWS('tabletest'),ALL('tabletest'))

isabella_1-1652086740256.png

set the measure format:

isabella_2-1652086880909.png

 

use the measure in a card :

isabella_3-1652086901153.png

Best Regards,

Community Support Team _Isabella

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

jp2050
Frequent Visitor

Hi,

 

There are multiple ways to go about it - but what you could do is select "Quick Measure" on the ribbon, select the division calculation, drag "wo_nummer" field in as numerator (should populate to "Count of wo_nummer," change the type/make sure it's count and not sum if not), and then drag the sum of the 0/1 column field in as denominator. Change the result to % type and you should get your desired result.

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.