Dual('Jan', 1)

Dual values in Power BI

Qlik fields can hold a dual value: a text and a number at the same time. Power BI columns have one data type, so you use a text column sorted by a number column (Sort by column).

Partial / different approach Modeling Power Query

Short answer: No 1:1 data type. Create two columns (Month and Month Number) and set Sort by column on the text column. Use the number column in calculations.

What it does in Qlik

Dual(text, number) creates a value that displays as text but sorts and calculates as a number. Many Qlik functions return duals, for example Month(), Date() and ApplyMap results. A typical use is month names that sort chronologically, or "Low/Medium/High" bands that sort by severity.

Qlik example

Qlik script
LOAD *, Dual(Text(Severity), SeverityRank) AS SeverityDual,
        Month(OrderDate) AS Month   // dual: 'Jan' / 1
FROM [lib://Data/tickets.qvd] (qvd);

Power BI equivalent

Two columns plus Sort by column

Power Query M
= Table.AddColumn(Source, "Month Number", each Date.Month([OrderDate]), Int64.Type)
= Table.AddColumn(Previous, "Month", each Date.ToText([OrderDate], [Format = "MMM", Culture = "en-US"]), type text)

Then in the model: select Month > Column tools > Sort by column > Month Number.

Gotchas and behaviour differences

  • Sort by column requires exactly one sort value per text value. "Jan" can't map to both 1 and 13.
  • DAX FORMAT() returns text, so FORMAT([Sales], "#,0") loses its number behaviour. Use format strings (or dynamic format strings) on measures instead.
  • Numeric comparisons on the text column (Month > "Mar") compare alphabetically. Use the number column.

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.