3 Replies Latest reply: Aug 11, 2011 3:38 AM by Liron Baram

# Set Expression result changes when using a dimension from a linked table

Hi all,

I have made a small example of the problem I'm running into:

This is my script:

Basis:

[ID, Type, Selectie, Selectie2ID

0,1,A,1
1,1,A,1
2,1,A,1
3,2,A,1
4,2,A,1
5,3,A,1
5,3,A,1
5,3,A,1
5,3,A,1
6,1,B,2
7,1,B,2
8,1,B,2
9,2,B,2
10,2,B,2
11,3,B,2
12,3,B,2
13,3,B,2
14,3,B,2];

det:
[Selectie2ID, Selectie2Name
1, A
2, B];

If I now create a chart where I use set statement to count the number of ID's based on their type and use "Selectie" as a dimension, it works as expected.

He shows me the amount of ID's that have type 1.

If I change this now and use "Selectie2Name" as a dimension, I would expect the same result. But he shows me a different graph.

The example qvw is attached.

Should there be an expression that works in both graphs or should I search for a different solution in the second graph?

What would be the solution for the second graph and also, why is there a difference ?

Tia !

• ###### Re: Set Expression result changes when using a dimension from a linked table

hei

i changed the expression in the second chart to

Count({\$<Type=-{1}>} ID)

• ###### Re: Set Expression result changes when using a dimension from a linked table

Hi, Thanks for the answer !

But the question I have now:

what is the difference between
count( {\$ - <Type = {1}>} ID

and

count( {\$ <Type = - {1} >} ID

Or is the first one just improper use of set statement?

• ###### Set Expression result changes when using a dimension from a linked table

hei

the first one exclude all the values of Type=1 in the model so as you have type=1 so now this values are excluded from the field value totaly,like they dont exists

the seconed one is the proper one