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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
VJR
Frequent Visitor

Calculate rate based on criteria in row

Hello,

 

I'm new to powerBI and this forum! I hope my explanations are clear enough and someone can help me 🙂

 

I'm trying to find a rate based on my data, based on a column with only 2 values (Yes/No). I want to find my rate based on those 2 values. Here are my formulas:

 

  • RateYes = DIVIDE(COUNT(CoverageDB[Nb Item]);(COUNT(CoverageDB[Nb Item])+COUNTBLANK(CoverageDB[Nb Item])))
  • RateNo = DIVIDE(COUNTROWS(GROUPBY('CoverageDB';CoverageDB[Loading country code];CoverageDB[Loading country and area];CoverageDB[Delivery country code];CoverageDB[Delivery Country code and region];"Count";SUMX(CURRENTGROUP();'CoverageDB'[Nb Item])));SUMX('Total';'Total'[Total]))

Both of these formulas work well independently. What I'm struggling with is doing something as follows:

  • Rate = IF(Column="Yes", RateYes, RateNo). PowerBI isn't letting me choose a column for the logical test.

Thanks in advance!

1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

Hi

Try with following

Rate = IF(selectedvalue(Column) ="Yes", RateYes, RateNo)

View solution in original post

2 REPLIES 2
Zubair_Muhammad
Community Champion
Community Champion

Hi

Try with following

Rate = IF(selectedvalue(Column) ="Yes", RateYes, RateNo)

Hi,

Thank you so much, works great!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors