I have an auxiliary with a subscripted range of two dimansions.
e.g. MembersofParliament[Constituency,Party]
Subscript values ( names of the members of the subscript ) are A,B,C etc. for the constituencies, and Conservitive,LibDem,Labour etc. for parties.
The value of the cell is the number of members who stand in each constituency for that party (normally 1 but can be 0 or 2).
Am I right in thinking that sum(MembersofParliament([A,Party!]) will give how many people stood for the seat A, and that sum(MembersofParliament([Constituency!,Labour]) will give the number of labour candidates in the whole election and that sum(MembersofParliament([Constituency!,Party!]) will give the total number of people standing for election?
Also I have another auxiliary TargetSeat[Party] that has the seat that they party wants to win e.g. TargetSeat[Labour] = 29 means they want to win the 29th seat in the list of constituencies. If I wanted to set the value of the target seats for each party would the logic for setting MembersofParliament say something like:
if then else( Constituency = TargetSeat[Party], 1, 0)
Refering to a 2D subscript value
-
- Super Administrator
- Posts: 4590
- Joined: Wed Mar 05, 2003 3:10 am
Correct.Am I right in thinking that sum(MembersofParliament([A,Party!]) will give how many people stood for the seat A, and thatsum(MembersofParliament([Constituency!,Labour]) will give the number of labour candidates in the whole election and that sum(MembersofParliament([Constituency!,Party!]) will give the total number of people standing for election?
I don't really follow the 2nd question. But try it and see if it does what you want it to.
Tony.
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm