LOAD *, Year(Date) AS Year; SQL SELECT ...;
Preceding LOAD in Power BI
A preceding LOAD lets one LOAD read the output of the LOAD or SELECT below it, without a resident table. Power Query works like this by default. Every applied step takes the previous step as input. The main thing to watch is query folding: early steps that fold run in the database, like the SQL SELECT at the bottom of a preceding-load stack.
What it does in Qlik
In Qlik, statements stacked above a SQL SELECT or LOAD are evaluated bottom-up. Each LOAD can refer to fields created by the one below, so you can compute a field and reuse it without repeating the expression.
Qlik example
Orders:
LOAD *, If(Margin > 0.3, 'High', 'Low') AS MarginBand;
LOAD *, (Sales - Cost) / Sales AS Margin;
SQL SELECT OrderID, OrderDate, Sales, Cost FROM dbo.Orders;Power BI equivalent
Power Query
let
Source = Sql.Database("srv", "db"),
Orders = Source{[Schema = "dbo", Item = "Orders"]}[Data], // folds
Cols = Table.SelectColumns(Orders, {"OrderID", "OrderDate", "Sales", "Cost"}),
Margin = Table.AddColumn(Cols, "Margin", each ([Sales] - [Cost]) / [Sales], type number),
Band = Table.AddColumn(Margin, "MarginBand", each if [Margin] > 0.3 then "High" else "Low", type text)
in
BandGotchas and behaviour differences
- A step that can't fold, such as some custom functions, index columns or certain type changes, stops folding for every step after it. Put row filters before it, the same way Qlik developers push WHERE clauses into the SQL SELECT.
- Division by zero gives
InfinityorNaNin M where Qlik gives NULL. Guard withif [Sales] = 0 then null else ....
Official documentation
- Load - script statement (Qlik Help)
- Overview of query evaluation and query folding in Power Query (Microsoft Learn)
- Query folding indicators (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
WHERE Exists(field [, expr])
Where Exists / Not Exists
Exists() checks whether a value has already been loaded into a field anywhere in the script. In Power Query, filter against a buffered list from another query, or use an inner or anti merge. Qlik's "everything loaded so far" behaviour is order-dependent, and Power Query has nothing like it.
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.