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

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.


Go to My LinkedIn Page


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.


Go to My LinkedIn Page


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.