While we have used the search strings in previous recipes to do a numeric search, we can also perform text searches by using the wildcard character, *
. Occasionally, however, you might want to compare the values in one field to the values stored in another. We can also achieve this using Set Analysis and the Concat()
function.
For the purpose of this recipe, we make use of product sales data as defined in the following script. Load the following script in the Qlik Sense Data load editor
:
Transactions: Load *, If(Len(TmpSubCategory)=0,Null(),TmpSubCategory) AS SubCategory; Load * INLINE [ ProductType, Category, TmpSubCategory, Sales Premium,A4,A4,300 Standard,A4,A4,100 Premium,A5,A5,500 Standard,A5,A5,200 Premium,A6,A6,1000 Standard,A6,A6,600 Premium,A1,,700 Standard,A1,,300 Premium,A2,,300 Premium,A3,,200 Standard,A3,,60 ];