Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Find combination of 2 values in a dimension

Hi all, My first post here so please go easy on me;)

I have a table containing Sales orders & order items and i'm looking for an easy way to

filter out all sales order containing 2 specific order items.

In the example below i have 4 orders, but only sales order 1 & 2 has both Order item A and Order item B

Sales orderOrder items
1A
1B
1C
2A
2D
2B
3F
3G
4A

Is there a way to filter out all the orders containing both order item, excluding orders that only contain one in a table or chart.

Ideally i would like to use input fields to set the variables for which order items to filter on.

Any suggestions would be very appreciated

Thank you

Best regards

Thord

1 Solution

Accepted Solutions
sunny_talwar

May be this

Count(DISTINCT {<[Sales order] = P({<[Order Items] = {'A'}>})*P({<[Order Items] = {'B'}>})>}[Sales order])

View solution in original post

4 Replies
sunny_talwar

May be this

Count(DISTINCT {<[Sales order] = P({<[Order Items] = {'A'}>})*P({<[Order Items] = {'B'}>})>}[Sales order])

vvira1316
Specialist II
Specialist II

Depending on data model/tables it may be possible to do it in script itself.

Select only those orders where order items = A and order items = B.

Will you be able to post any sample of your data and/script?

BR,

Vijay

Not applicable
Author

Thank you Sunny, that worked great!

Shubham_Deshmukh
Specialist
Specialist

Hi Sunny,

Can you guide me on set Expressions?

Means from where I can learn it better.