Forum Discussion
gmasta1129
1 year agoResolver I
Formula to pull max value based off another column
Hello, I would like to pull the maximum number in the "Total" column based off the customer account number. My data has thousands of rows. I need the maximum value to pull into the new column...
- 1 year ago
Hi gmasta1129
You can try this DAX to get your desire output by create new calculated column.
Best Regards,
Muhammad YousafIf this post helps, then please consider "Accept it as the solution" to help the other members find it more quickly.
Kedar_Pande
1 year agoSuper User
Create a calculated column:
New Column (Maximum Value) =
VAR MaxValue = CALCULATE(
MAX('Table'[Total]),
ALLEXCEPT('Table', 'Table'[Customer Account Number])
)
RETURN IF('Table'[Total] = MaxValue, MaxValue, 0)
This approach will create a column in which only the row with the maximum value for each Customer Account Number shows the max value, while other rows display 0, just like in your Excel formula.
💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn