Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
chiranjivdas
Contributor III
Contributor III

How to create a flag based on a dimension that is not presented in a straight table?

I have 3 Transactions

Transaction 1

Transaction 2

Transaction 3

Each transaction has one core product (either x or y) and many sub-products.

Transaction 1:

    product x (core)

    product 1

    product 2

Transaction 2:

    product y (core)

    product 3

    product 4

Transaction 3:

    product x (core)

    product 1

    product 4

I want to flag transactions on the basis of their core products. I want transactions 1 and 3 to be flagged as 'X' and transaction 2 to be flagged as 'Y'. The straight table should look like

Transaction 1: X

Transaction 2: Y

Transaction 3: X

Please note that the products are not to be displayed in the straight table.

Thanks,

CD

1 Reply
Anonymous
Not applicable

CD

You can create such a flag in your load script, by in your load statement using something like:

If ( [ProductFiled] = 'Product x' , 'X'

     If ( [ProductFiled] = 'Product y' , 'Y' , null() )     as [Product Flag] ;

I must admit that I am unclear on your actual table / data  structure, so if my answer is wrong then please supply for each table a few sample lines of data including column names.

Best Regards,     Bill