Forum Discussion
How do i find maximum values from a column with respect to other column data
- 2 years ago
Hi Anonymous
If you want a Dax solution, you can add a calculated column with the formula:
max_by_id = CALCULATE(max('Table'[Result Value]), ALLEXCEPT('Table','Table'[Batch ID]))Pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
- 2 years ago
Hi Anonymous
If you want the values to change according to the slicers / filters selections you cant use calculated columns and need to create measures.
The updated pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hi Anonymous
If you want a Dax solution, you can add a calculated column with the formula:
Pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
- Anonymous2 years agoNot applicable
Sample Data
Batch ID Result Value Replicate 817 2.93 1 817 2.85 2 821 3.02 1 821 2.94 2 Expected result
Bach ID Result Value Replicate Max_Value Min_Value
Range
817 2.93 1 2.93 2.85 0.08 817 2.85 2 2.93 2.85 0.08 821 3.02 1 3.02 2.94 0.08 821 2.94 2 3.02 2.94 0.08 Rita Te approach is correct but the result is not expected for my data. I tink you didn't use the replicate filter. So, when Replicate is 1 the Max_value should be 2.93 and 3.02 and when it is 2 the Min_Value should be 2.85 and 2.94. And we need to calculate the range i,e Range = Max_value - Min_Value. Please suggest this approach of the dax.
- Ritaf19832 years ago
Super User
Hi Anonymous
If you want the values to change according to the slicers / filters selections you cant use calculated columns and need to create measures.
The updated pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
- Anonymous2 years agoNot applicable
Thanks for the solution. That worked.