This article will cover the syntax of the ‘loosen table’ regular script statement.
The loosen table statement is used to force Qlik to isolate specific fields in a table in the data model. It is the equivalent of loading each table field as a separate standalone unconnected table.
Statement syntax
Loosen Table | Tables tablename [ , tablename2 ...]
Tablename | A comma separated list of tables to be loosened. |
Example
A table is loaded and loosened resulting in a disconnected set of fields.
ITEM_DETAILS:
LOAD
id as itemId,
cost,
"type",
flavour
FROM [lib://Public:DataFiles/item_details.xlsx]
(ooxml, embedded labels, table is Sheet1);
Loosen Table ITEM_DETAILS;
Result
All table fields are loaded but aren’t associated with each other. Adding multiple fields into a single data table results in a ‘cross join’ behaviour.