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
markus123
Frequent Visitor

Percent of a specific value between two columns

Dear all,

 

pretty sure this was asked before, but i haven't found the right topic.

 

I would like to calculate the percentage of a specific value in Column A in relation to the total number of rows in Column B.

In Detail:

 

- Column A = "Customers"

- Column B = "Contacted" (possible answer here "yes" or "no"

 

I need the percentage of "yes", in order to get the contact ratio.

 

Thanks for your help in advance!

6 REPLIES 6
PijushRoy
Super User
Super User

Hi @markus123 

Try this

PercentageCalculation = VAR _count = COUNTA(Data[Contacted])
VAR _countyes = CALCULATE(COUNTA(Data[Contacted]),Data[Contacted]="Yes")
RETURN
_countyes/_count
 
0pb1.JPG
 
If you have any question, please let me know.
If solve your requirement, please mark this answer as SOLUTION
If this comment helps you, please LIKE this comment/Kudos



Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





Don't know why, but it is not working.

 

Maybe i need to explain it a little bit easier.

 

I just need the following formula in power bi language:

 

All rows from column A (Contacted) with the value "YES", devided by All rows from column B (Customers)

@markus123 
Try this
PercentageCalculation = 
VAR _count = COUNT('TableName'[Customer])
VAR _countyes = CALCULATE(COUNTA('TableName'[Contacted]),'TableName'[Contacted]="Yes")
RETURN
_countyes/_count

If you have any question, please let me know.
If solve your requirement, please mark this answer as SOLUTION
If this comment helps you, please LIKE this comment/Kudos




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





PijushRoy
Super User
Super User

@markus123 
Please share sample data and expected result to understand requriement clearly




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





markus123_0-1645374232927.png

 

Maybe this image will help. You can 4 rows in total, means 4 customers.

Column "Contacted" show two times "yes & two times "no".

Contact ratio should be 50%, but i don't how to create to measure correctly.

 

It is a list of 350 customers in total.

@markus123 
Try this
PercentageCalculation = 
VAR _count = COUNT('TableName'[Customer])
VAR _countyes = CALCULATE(COUNTA('TableName'[Contacted]),'TableName'[Contacted]="Yes")
RETURN
_countyes/_count

If you have any question, please let me know.
If solve your requirement, please mark this answer as SOLUTION
If this comment helps you, please LIKE this comment/Kudos



Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





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