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.
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
MaxString(Status)
MinString({<Year={2026}>} CustomerName)Power BI equivalent
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 theCustomertable through a one-way relationship, soCALCULATE ( 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 withSUMMARIZE ( 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
- MaxString - chart function (Qlik Help)
- MinString - chart function (Qlik Help)
- MAX function (DAX) (Microsoft Learn)
- MAXX function (DAX) (Microsoft Learn)
Related pages
FirstSortedValue(Product, -Aggr(Sum(Sales), Product))
FirstSortedValue
FirstSortedValue returns the value of one field on the record with the lowest (or, with a minus sign, highest) sort weight, such as the top-selling product or the latest status. In DAX, use TOPN plus a tie check, or LASTNONBLANKVALUE for "latest".
Partial / different approach
Only(Region)
Only
Only() returns a value when exactly one value is possible and null otherwise. In DAX that is SELECTEDVALUE, which also accepts an alternate result.
Direct equivalent
Concat(DISTINCT Product, ', ')
Concat (string aggregation)
Concat() joins values into one string. DAX has CONCATENATEX and Power Query has Text.Combine. The sort order and the duplicate handling are different from Qlik's defaults.
Direct equivalent
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.