Allocation Methods

2.85K viewsFormulas and Functions

Hi All –

Wondering if you can help me … I’m totally new to Quantrix, so I apologize if this is easy or has been answered elsewhere! (I did try to search, to no avail). I have a model where I have employees that need to be allocated amongst different states for payroll purposes. E.g., I might spend 50% of my time in one state and 50% in another, so we allocate payroll accordingly. I’m attaching a model that describes the setup, but basically I created an employee list and assigned each employee to an allocation method. I then created an allocation matrix that has the appropriate allocations amongst the different states. The last step is where I’m having trouble – I’d like to do a lookup (the employee table contains the allocation method, so I’d like to lookup the % for each state from the allocation matrix so that I know how much to allocate each employee to each state).

Any suggestions? I’ve tried select but kept getting “#SIZE” errors and I’ve now started using “Using/As” which seems a bit more intuitive for me, but I’m getting the wrong answer (it’s all going to the 1st state rather than the “correct” one).

Thanks in advance!



Hi ktr.
You cannot use Using/As because key values (Method1, etc.) are Item names, not cell data. So you have to use select(). With some trial and error, I managed avoiding the #SIZE error: I enclose a modified version of your model that should work as desired.
The trick is having the same number of values returned by the first and second argument of select; here the nice part is that Allocations::Method returns a list of vectors (with one value for each state) whose length is equal to the number of methods, and @Allocations::Method returns a list of Method names having the same length. In this way you avoid the #SIZE error. The assignment of the correct allocation share to each state is performed magically by the “State” linked category.
Hope this helps.


You are viewing 1 out of 2 answers, click here to view all answers.