Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
timpoismans
Specialist
Specialist

Set analysis - excluding values

Hi all.

Consider the following situation:

Superartikel issue.PNG

Every Document Number has Items. Every Item can have multiple Product Groups.

The customer has a number of Products they view as "Super articles". But some Items are built out of more than one "Super article"

For example, Item 27 in the picture. After filtering of the "Super articles" the Item is listed under the 500-584 Product Group, but it's listed under the BA4 Product Group as well.

We only want to see it under the BA4 Product Group, so I thought set analysis like this:

     Sum({<[Product Group] = {">=500<=584"} - {'BA4'}>}

would stop Item 27 from showing in the 500-584 Product Group. But it seems I'm completely wrong, as Item 27 is still showing here.

Any advice would be appreciated,

Thanks in advance!

Kind regards,

Tim Poismans

26 Replies
antoniotiman
Master III
Master III

Like this

Sum({<[Product Group] = {">=500<=584"} ,[Product Group]-= {'BA4'}>} Amount)

timpoismans
Specialist
Specialist
Author

I tried to make a simple dummy qvf that hopefully explains what I want to achieve.

Data is as following:

Superartikel issue2.PNG

You can see 3 items for DocNr 220150.
Item 1 and Item 3 would pass both conditions (It has a product with product group between 500-584 and it has a product with product group = BA4.

So I don't want to see Item 1 and 3.

What I want to achieve is:

Superartikel issue3.PNG

timpoismans
Specialist
Specialist
Author

Was one of the first things I tried. Sadly, it didn't work.

I posted a qvf with dummy data below, which is, hopefully, clearer in what I want to achieve.

timpoismans
Specialist
Specialist
Author

I've added a qvf with dummy data above which might explain my issue in a better way.

brunobertels
Master
Master

Hi

MAy be this

   Sum({< [Product Group]={">=500<=584"} , [Product Group]-={"BA4"}>}Amount)

timpoismans
Specialist
Specialist
Author

Was suggested above as well. One of the first things I tried which doesn't work out.

antoniotiman
Master III
Master III

Try this

Sum({<[Product Group] = {">=500<=584"} ,Item=E({<[Product Group]={'BA4'}>})>} Amount)

antoniotiman
Master III
Master III

timpoismans
Specialist
Specialist
Author

Yes, this seems to be working!

I'm still running a testorder through it, but it seems to be working so far.

It's not showing an article that it should show, but I think that's an error on the client's side.

If it goes through the testing, I'll check back and mark your answer as the correct one.

Could you give me a bit more explanation with the Item=E()... part of the measure?Not really sure how it works.

Thanks in advance!

antoniotiman
Master III
Master III

Exclude Items (1 and 3) where Product Group ='BA4'