cancel
Showing results for
Did you mean:
Highlighted
Regular Visitor

## utilizing relationship to calculate min and max

Hello

I have a problem i need help with.

I have alot of measurements mashed up in a data table, i wanna calculate the min and max for the ratio column for each different group in the number column.

I want these min and max values displayed in the overview table of all the different nr (the Max column is missing)

Hope someone can help

Regards Ratax

2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Support Team

## Re: utilizing relationship to calculate min and max

Hi @Ratax,

Create two calculated columns in the target table.

`MAX = CALCULATE(MAX(Table1[Ratio]),ALLEXCEPT(Table2,Table2[Anti]))`
`Min = CALCULATE(MIN(Table1[Ratio]),ALLEXCEPT(Table2,Table2[Anti]))`

For more details, please check the pbix as attached.

Regards,

Frank

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

## Re: utilizing relationship to calculate min and max

Hi,

Try these calculated column formulas

Max=CALCULATE(MAX(Data[Ratio]),FILTER(Data,Data[Nr]=EARLIER(Data[Nr])))

Min=CALCULATE(MIN(Data[Ratio]),FILTER(Data,Data[Nr]=EARLIER(Data[Nr])))

Hope this helps.

2 REPLIES 2
Community Support Team

## Re: utilizing relationship to calculate min and max

Hi @Ratax,

Create two calculated columns in the target table.

`MAX = CALCULATE(MAX(Table1[Ratio]),ALLEXCEPT(Table2,Table2[Anti]))`
`Min = CALCULATE(MIN(Table1[Ratio]),ALLEXCEPT(Table2,Table2[Anti]))`

For more details, please check the pbix as attached.

Regards,

Frank

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

## Re: utilizing relationship to calculate min and max

Hi,

Try these calculated column formulas

Max=CALCULATE(MAX(Data[Ratio]),FILTER(Data,Data[Nr]=EARLIER(Data[Nr])))

Min=CALCULATE(MIN(Data[Ratio]),FILTER(Data,Data[Nr]=EARLIER(Data[Nr])))

Hope this helps.