cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
mikesfagan Occasional Visitor
Occasional Visitor

Use values from other rows to execute a custom calculation

I'm trying to write a custom calculation in the Total Protein advancedcalcs field, where i can use the Enteredvalue value of the Purity result to calculate a new Protein result fo reach unique keyid1 value.  Bascially, subtracting the Purity value from the Total

Protein value.  What's the best way to do this?

Capture.PNG

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Use values from other rows to execute a custom calculation

Hi @mikesfagan ,

 

We can use the following measure to meet your requirement:

 

advancedcal = 
AVERAGEX (
    FILTER ( ALL ( 'Table' ), [keyid1] IN FILTERS ( 'Table'[keyid1] ) ),
    [enteredvalue]
)

 

8.PNG

 

 

BTW, pbix as attached.

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
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
Community Support Team
Community Support Team

Re: Use values from other rows to execute a custom calculation

Hi @mikesfagan ,

 

We can use the following measure to meet your requirement:

 

advancedcal = 
AVERAGEX (
    FILTER ( ALL ( 'Table' ), [keyid1] IN FILTERS ( 'Table'[keyid1] ) ),
    [enteredvalue]
)

 

8.PNG

 

 

BTW, pbix as attached.

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
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

Community Support Team
Community Support Team

Re: Use values from other rows to execute a custom calculation

Hi @mikesfagan ,

 

How about the result after you follow the suggestions mentioned in my original post?

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors