MAXA

Returns the largest value in a column, treating TRUE as 1, FALSE as 0, and non-numeric values as zeros.

Quick Coach Video

What it does?

Returns the largest value in a column, treating TRUE as 1, FALSE as 0, and non-numeric values as zeros.

Syntax

MAXA( <column>)

Returns

The largest value.

What is the MAXA Function?

The MAXA function in DAX is like a savvy treasure hunter searching for the tallest mountain in a land of varied terrain. In our treasure hunt, TRUE values are like glorious peaks reaching high (counted as 1), while FALSE values are like tiny hills that don’t add any height (counted as 0). So, whether you're looking for the highest mountain or the most operational machine, MAXA helps you find the standout peaks in your dataset!

Example 1: Machine Status Monitoring

Imagine you’re monitoring the operational status of various machines in a factory. Each machine is either operational (TRUE) or not operational (FALSE). Here’s how your machine status data might look:

MachineStatus table

Machine Name

Operational Status

Machine A

TRUE

Machine B

FALSE

Machine C

TRUE

To find the maximum operational status using the MAXA function, you would use:

Max Operational Status = 
MAXA(MachineStatus[Operational Status])

Total Calculation:

  • Machine A: TRUE (counted as 1)
  • Machine B: FALSE (counted as 0)
  • Machine C: TRUE (counted as 1)

So, what’s the highest operational status? It’s 1 (or TRUE)! 🏭✅

Example 2: Temperature Threshold Monitoring

Now, let's say you have a dataset from various temperature sensors indicating whether the temperature threshold has been met. Here’s how your sensor data might look:

SensorData table

Sensor Name

Temperature Threshold Met

Sensor 1

TRUE

Sensor 2

FALSE

Sensor 3

TRUE

Sensor 4

FALSE

To find the maximum status of whether the temperature threshold is met using the MAXA function, you would use:

Max Temperature Threshold Met = 
MAXA(SensorData[Temperature Threshold Met])

Total Calculation:

  • Sensor 1: TRUE (counted as 1)
  • Sensor 2: FALSE (counted as 0)
  • Sensor 3: TRUE (counted as 1)
  • Sensor 4: FALSE (counted as 0)

So, what’s the highest status of the temperature threshold? It’s 1 (or TRUE)! 🌡️✅

Conclusion: Max It Out with MAXA!

The MAXA function in DAX is your essential tool for identifying the highest value in datasets that include Boolean values. Whether you’re monitoring machine status or analyzing temperature thresholds, MAXA helps you keep track of critical indicators!