9 Replies Latest reply: Dec 16, 2015 1:35 PM by jim sullivan

# Set analysis: Ignore or include selected dimension

Hi,

I am not able to find out how to ignore and include some of the dimensions using set analysis. For ex:

Emp    Team   Sales

e1        T1        1000

e3        T2         500

e2        T1         1500

Now selecting e1 should give sum of corresponding team i,e 1000 + 1500 = 2500.

I am using this expression in Text object:

sum({\$< Team = {\$(#vTeam)}>}Sales) but result is 0.

What is the error here?

Also, what are other ways to achieve this?

regards,

Mayank

Message was edited by: mayank.rishu

• ###### Re: Set analysis: Ignore or include selected dimension

this should work

=

sum({\$<[team]={'t1'}>} [sales]

• ###### Re: Set analysis: Ignore or include selected dimension

Thanks miteamgib!

This will certainly work but I can't limit it to 't1'. Data can vary accordingly.

• ###### Re: Set analysis: Ignore or include selected dimension

If you have a variable vTeam with value T1 then sum({\$< Team = {'\$(vTeam)'}>}Sales) will return 2500.

It's not possible to select only e1 and get the total for T1 back and not for T2. e1 is a member of both T1 and T2 so there's not enough information to determine which team total should be shown if you select only e1.

• ###### Re: Set analysis: Ignore or include selected dimension

Hey Gysbert,

yes I have variable but this is also showing up 0!

• ###### Re: Set analysis: Ignore or include selected dimension

Gysbert,

I agree on your explanation so lets invert the selection to e2. Selecting e2, I need total sum of T1.

Mayank

• ###### Re: Set analysis: Ignore or include selected dimension

Try sum({<Emp=p({<Emp=,Team=p(Team)>}Emp)>}Sales). See attached example.

• ###### Re: Set analysis: Ignore or include selected dimension

This looks correct! Exactly what I was looking for. Thank you!

• ###### Re: Set analysis: Ignore or include selected dimension

Can you explain ? Thanks in advance.

sum({<Emp=p({<Emp=,Team=p(Team)>}Emp)>}Sales)