Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, bit of a weird chart i need the best way to approach, we have a table of total labour resource per period, vs person, e.g.
Person, P1, P2, P3, P4, P5
A,1,1,1,1,1
B,0,0,1,1,1
C,0.9,0.9,0.9,0.9,0.9
D,1,1,0,0,0
etc (for 12 periods)
The letter is the person name, the number is the percentage of full time resource, 0.9 = part time.
I would like a bar chart, with total resource count (sum of the numbers for that period) on Y and the Periods on X.
Any idea how to achieve this (one issue i have already hit is the ordering puts P10,P11,P12 out of order, as it treats them as sorting by number after letter, so rather than P9,P10,P11,P12, you get something more like P1,P10,P11,P12,P2)
Hi
this script will create a field that is sorted right
Table1:
load * inline [
Person,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12
A,1,1,1,1,1,0,1,0.5,1,1,1,1
B,0,0,1,1,1,0,0,1,1,1,0,1
C,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9,0.9
D,1,1,0,0,0,1,1,0,0,0,1,0
];
Table2:
CrossTable(period,data,1)
load *
resident Table1;
Table3:
load *,
Dual(period, PurgeChar(period,'P')) as periodFull
resident Table2;
drop Table Table1,Table2;