LOAD DISTINCT CustomerID, Region RESIDENT Orders;
LOAD DISTINCT in Power BI
LOAD DISTINCT maps to Power Query's Remove duplicates (Table.Distinct) on the selected columns. Two differences matter. Table.Distinct is case-sensitive while the model isn't, and Remove duplicates on a subset of columns keeps one row per key, which isn't guaranteed to be the first one unless you sort and buffer the table first (Table.Buffer). In DAX, DISTINCT() and VALUES() return unique values for calculated tables.
What it does in Qlik
LOAD DISTINCT removes duplicate rows from the loaded result. It applies to the whole row of loaded fields, and to every preceding load stacked above it.
Qlik example
Customers:
LOAD DISTINCT CustomerID, CustomerName, Region RESIDENT Orders;Power BI equivalent
Power Query
= Table.Distinct(Table.SelectColumns(Orders, {"CustomerID", "CustomerName", "Region"}))
// case-insensitive key (what the model will do anyway)
= Table.Distinct(Customers, {"CustomerID", Comparer.OrdinalIgnoreCase})DAX calculated table
Customers = DISTINCT ( SELECTCOLUMNS ( Orders, "CustomerID", Orders[CustomerID], "Region", Orders[Region] ) )Gotchas and behaviour differences
- The classic refresh error. "Column 'CustomerID' contains a duplicate value 'abc'" appears on the one side of a relationship when Power Query kept both "ABC" and "abc", or "abc" and "abc ". Remove duplicates case-insensitively and trim first.
- Removing duplicates on a key while other columns differ silently keeps one arbitrary row. That differs from Qlik's DISTINCT, which keeps all distinct full rows. Decide which row wins, for example with Group By and Max(Date).
Official documentation
- Loading data from a previously loaded table (Qlik Help)
- Table.Distinct (Power Query M) (Microsoft Learn)
- Working with duplicate values (Microsoft Learn)
- DISTINCT (table) function (DAX) (Microsoft Learn)
Related pages
LOAD ... RESIDENT table; DROP TABLE table;
Resident load and intermediate tables
A Resident load reads a table already in memory. The Power Query equivalent is a referenced query, but it re-runs its source instead of reading from memory. Heavy multi-step transformations are better done upstream in a warehouse, dataflow or lakehouse.
Partial / different approach
LOAD ..., Sum(x) RESIDENT t GROUP BY ...
Group By in the load script
GROUP BY in a Qlik load pre-aggregates a table. Power Query's Group by (Table.Group) is the direct equivalent. In Power BI you often don't need it at all, because measures aggregate at query time.
Direct equivalent
Count(DISTINCT CustomerID)
Count, Count(DISTINCT) and counting key fields
Count(DISTINCT Field) maps to DISTINCTCOUNT. Watch out for blanks, for which table you count from, and for the Qlik habit of counting key fields.
Direct equivalent
Trim(Replace(Name, ' ', ' '))
Replace and Trim
Qlik Replace maps to DAX SUBSTITUTE, not DAX REPLACE, which is positional. Trim has a subtle difference. Qlik Trim and Power Query Text.Trim only remove leading and trailing spaces. DAX TRIM also collapses repeated spaces inside the text to one, so the results can differ.
Partial / different approach
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.