Discussion Board for collaboration related to QlikView App Development.
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?
Thanks for your time!
regards,
Mayank
Message was edited by: mayank.rishu
Try sum({<Emp=p({<Emp=,Team=p(Team)>}Emp)>}Sales). See attached example.
this should work
=
sum({$<[team]={'t1'}>} [sales])
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.
Thanks miteamgib!
This will certainly work but I can't limit it to 't1'. Data can vary accordingly.
Hey Gysbert,
yes I have variable but this is also showing up 0!
Gysbert,
I agree on your explanation so lets invert the selection to e2. Selecting e2, I need total sum of T1.
Mayank
Try sum({<Emp=p({<Emp=,Team=p(Team)>}Emp)>}Sales). See attached example.
This looks correct! Exactly what I was looking for. Thank you!
Can you explain ? Thanks in advance.
sum({<Emp=p({<Emp=,Team=p(Team)>}Emp)>}Sales)