4 Replies Latest reply: Feb 25, 2011 3:07 PM by Florian Kausler

# Set analysis and charts problem

This is possibly quite basic but what am I missing here? I have an order table that is read to my qv-module. I have two diffrent Ordernumbers, lets call them O1 and O2. O1 is in the order table but O2 is in another table that is keyed to the order table with an unique key.

So for example if O1 is 123456 it has a representation in O2 of 242424, but! 242424 is also in O1 (these are just arbetrary numbers)

What I want to do in my chart is to get O1 and the representating O2 and then the =sum(Value) for the number of O2 in the O1. To illustrate somewhat:

O1 -- O2 -- Value
123456 -- 242424 -- 1000 (this being the Value of O1=242424)
555555 -- 777777 -- 2000 (this being the Value of O1=777777)

The problem I have is that I can't get the correct values in "Value". I've tried using set analysis with various syntaxes:

=sum({<O1= {\$(=O2)}>} Qty*ItemValue)

But I always get '0' in this field

Anyone have any ideas why this is and what I'm doing wrong here?

• ###### AW:Set analysis and charts problem

Hi Mauich,

I am not quite sure. Maybe you can post your application?

cheers

Florian

• ###### AW:Set analysis and charts problem

It's very big and complex but I can try to cut out this code to show you

• ###### Set analysis and charts problem

OrderDate,

CustomerNbr,

OrderNbr

OrderNbrKEY,

Type,

Season

OrderNbrKEY,

text(Swap) as OrderNbrSWAP

That's the part of my load script that I'm working with here.

It should look like this

But I get Value = 0 for whatever I do.

• ###### AW:Re: Set analysis and charts problem

Hi Mauich,

I had a similiar discussion with a collegue today and set analysis is the wrong approach. You should use an IF statement instead, I believe this will work.

cheers

Florian