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! Request now

Reply

How to create a measure to calculate something like this (A-B)/A in each row

Hi,

good day.

 

I have a table called POs, and there are two columns; one for PR price and another for PO price and I want to get the following:

1-( PR -PO )/PR

2- The Average of that.

3- how many row was "the result in 1" greater than 20%

 

can you help.

Best Regards.

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi, @freevission2019 

Please correct me if I wrongly understood your question.

If you are looking for something like below,

please check the below link, which is the sample pbix file.

Otherwise, if it is OK with you, please share your sample data file, then I can look into it to come up with more accurate measures.

 

Picture2.png

 

average of that =
AVERAGEX( 'Table', DIVIDE('Table'[PR Price] - 'Table'[PO Price], 'Table'[PR Price]))
 
countrows greater than 20% =
COUNTROWS( FILTER('Table', [average of that] >0.2))
 
 

Jihwan Kim

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


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

2 REPLIES 2

Thank you very much Jihwan. 

perfect😊 👌

Jihwan_Kim
Super User
Super User

Hi, @freevission2019 

Please correct me if I wrongly understood your question.

If you are looking for something like below,

please check the below link, which is the sample pbix file.

Otherwise, if it is OK with you, please share your sample data file, then I can look into it to come up with more accurate measures.

 

Picture2.png

 

average of that =
AVERAGEX( 'Table', DIVIDE('Table'[PR Price] - 'Table'[PO Price], 'Table'[PR Price]))
 
countrows greater than 20% =
COUNTROWS( FILTER('Table', [average of that] >0.2))
 
 

Jihwan Kim

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


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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
Top Kudoed Authors