Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
oliwrs10
Contributor
Contributor

FIXED Level of Detail Expressions

Hi all,

I have a table with order_id and variant_sku.

I would like to look at all orders where the order contains a specific variant sku.

The result would be that all order_id will be selected, where this variant_sku is contained.

This will give me the change to analyse what other products are inside these baskets.

e.g. Customers who bought product apple also buy very often bananas and oranges.

 

I know this formula from tableau which starts with {FIXED [order_id] : ...

 

 

Many thanks in advance

Oliver

Labels (2)
1 Solution

Accepted Solutions
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Oliver,

As you correctly identified in Labels, this is about Set Analysis. The tricky part in your situation is that you don't want to limit your data to the specific variants, but rather limit your data to Orders that contain the specific variants. 

So, the syntax in this case would be the following:

sum( {<OrderID=P({<Variant={'Apples', 'Oranges'}>} OrderID), Variant=>}  Value)

This formula will show you all products that were ordered in those Orders that contained Apples or Oranges.

Come to the Masters Summit for Qlik and learn advanced Set Analysis, along with other advanced development techniques, from some of the best experts in the world! We will be in Dublin in October and in Orlando in November. Don't miss! 

View solution in original post

2 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Oliver,

As you correctly identified in Labels, this is about Set Analysis. The tricky part in your situation is that you don't want to limit your data to the specific variants, but rather limit your data to Orders that contain the specific variants. 

So, the syntax in this case would be the following:

sum( {<OrderID=P({<Variant={'Apples', 'Oranges'}>} OrderID), Variant=>}  Value)

This formula will show you all products that were ordered in those Orders that contained Apples or Oranges.

Come to the Masters Summit for Qlik and learn advanced Set Analysis, along with other advanced development techniques, from some of the best experts in the world! We will be in Dublin in October and in Orlando in November. Don't miss! 

oliwrs10
Contributor
Contributor
Author

Hi Oleg,

many thanks for your quick respond. You solution works perfetly.

Have a great day.

Cheers

Oliver