MaxString(Status)

MaxString and MinString in Power BI

MaxString and MinString return the last and first text value in sort order. DAX MAX and MIN already work on text columns, so the mapping is direct. The difference is how the two tools sort text.

Direct equivalent DAX

Short answer: MaxString(Status) becomes MAX(Orders[Status]), and MinString becomes MIN. To get text from an expression, use MAXX(table, text expression).

What it does in Qlik

MaxString(expr) returns the last value in text sort order, and MinString(expr) the first. Values are compared by their text representation, and NULLs are ignored. If there are no values with a text representation, the result is NULL.

Qlik example

Qlik chart expressions
MaxString(Status)
MinString({<Year={2026}>} CustomerName)

Power BI equivalent

DAX

DAX
Last status (alphabetical) = MAX ( Orders[Status] )

First customer name 2026 =
CALCULATE (
    MINX ( SUMMARIZE ( Sales, Customer[Name] ), Customer[Name] ),
    'Date'[Year] = 2026
)

Gotchas and behaviour differences

  • DAX text comparison is case-insensitive and follows the model collation. Qlik sorts by its own collation, so mixed-case or accented values can give a different winner.
  • Dimension filters: a filter on 'Date' doesn't reach the Customer table through a one-way relationship, so CALCULATE ( MIN ( Customer[Name] ), 'Date'[Year] = 2026 ) returns the first name among *all* customers. Qlik's set only keeps customers with 2026 records. Going through the fact table with SUMMARIZE ( Sales, Customer[Name] ) fixes that.
  • If you meant "the latest status by date", neither function does that. Use the FirstSortedValue pattern or LASTNONBLANKVALUE.

Official documentation

Related pages

Spotted an error or a better pattern? QlikToDax is maintained by a working BI consultant; corrections are welcome via the About page. Last reviewed 2026-10-25.