2
votes

I have two columns and I need to extract the maximum value of those two for every row in my table. I have looked at the Max, Maxx and Maxa, but they all have input for just one column.

How would I write following expression in a Calculated column:

=max(
    Table1[Column1],
    Table1[Column2]
)
2

2 Answers

1
votes

Instead of MAX, you can just use a simple IF to achieve what you want:

= IF(Table1[Column1] >= Table1[Column2], Table1[Column1], Table1[Column2])
4
votes

Actually, you should write the formula exactly as you described:

=max(
Table1[Column1],
Table1[Column2]
)

MAX function in dax exists in 2 versions: one takes a single column, the other takes 2 singular expressions.