When building a Qlik Sense app, you often have to deal with some data issues such as duplicated records or values in a field. The duplication can be created by design, just like the customer ID in a sales transaction table, or could be an error if we find two exactly identical records created in a table.
This recipe will show you how to use the distinct clause to work with duplicated data in the Data load editor
as well as in the object expressions.
For this recipe, we will make use of an inline data load that gives us sample data to demonstrate how the distinct clause works:
- Create a new Qlik Sense file, and name it
Distinct Clause
. - Add the following
Inline
table that contains the location information for countries:
SalesData: LOAD * INLINE [ Product Line, Product Group, Product Sub Group, Year, Sales, Cost Drink, Beverages, Juice, 2015, 12000, 6000 Drink, Beverages, Juice, 2015, 12000, 6000 Drink, Beverages, Juice, 2014, 16000...