cancel
Showing results for 
Search instead for 
Did you mean: 

Show only AND AND not AND OR

Former Member
0 Kudos

Hi Experts,

Reporting.

Question, how can you show all documentnumbers which contains line-items with a selection on productgroup 1 & 2.

So the report must only show those documentnumbers and only showing sales for those productgroups complementary. Not documentnumbers with 1 or 2, but only documentnumbers where 1 AND 2 are sold.

Thx!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Your question is not clerar.

Any how , if you have PRODUCTGROUP1 and PRODUCTGROUP2 characterstics in the Datatarget , then simply you can go with Filter as shown below and Document numbers in the rows.

PRODUCTGROUP1 = X

PRODUCTGROUP2= Y

if you have PRODUCTGROUP Characterstic in the Datatarget , and 1 and 2 are possible values . then Take your KF 2 times .

Restrict the first KF with PRODUCTGROUP = 1.

Restrict the second KF with PRODUCTGROUP = 2.

Then use boolean formula onthese 2 KF two chcek both has values.And you should take Document numbers in the rows.

With rgds,

Anil Kumar Sharma .P

Message was edited by:

Anil Kumar Sharma

Former Member
0 Kudos

OK, if you have two charactristics Product1 (P1) and Product2 (P2), here's another option if you want to have P1 = X AND P2 = Y documents.

Create a query (help query) with the document number in the drilldown.

Restrict P1 to a variable with user input (=X)

Take your original query (where you want to restrict with AND), create a variable with user input on P2 (=Y)

Restrict your Document number to a replacement variable of type QUERY Result where you select your help query.

Caution: this could be a perf issue depending on the amount of data; also think to include more restrictions on the help query...

hope that helps

cheer,

Olivier.

Answers (3)

Answers (3)

Former Member
0 Kudos

By reading your initial question I understand it now better.

In document you can sales for different Product Groups and want to show sales when a particulat combunation is sold.

Take my solution with the help query filtering on a variable. This will return all docs with at least one P = X.

In the second query you'll have the previous doc list and restrict the product group group again with another var.

This will work.

Anil suggestion is also fine. 2 restricted KF and after you can make a condition (==> WHERE KF1 <> 0 AND KF2 <> 0 which would be the same actually than

WHERE NOT (KF1 = 0 OR KF2 = 0)

hope this sove your issue

cheers

Olivier.

Former Member
0 Kudos

Hi,

Your question is not cle

Former Member
0 Kudos

Could you please explain in detail.

Thanks

Former Member
0 Kudos

I want to show all documentnumbers and with a selection on e.g. productgroup 1 & 2, thus showing all documentnumbers with productgroup 1&2.

Result must show only productgroup 1 AND 2, not 1 OR 2 (standard behaviour).

Former Member
0 Kudos

You can put a restriction on Productgroup in the Filter screen. You restrict it to both values. It should work.

Thanks.

Former Member
0 Kudos

Hi,

I don't quite understand; if you take one record, the product group shall be 1 OR 2 but cannot have both values at the same time correct?

Therefore if you select 1 AND 2 you should get 0 records, am I right?

Please clarify

regards,

Olivier.

Former Member
0 Kudos

No it shows all documentnumbers for which is true:

productgroup 1

or

productgroup 2

or

both

NOT

productgroup 1 & 2