Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
I'm trying to do crosstable transform from a resident load but I'm getting an error about field names must be unique but I can't see what I'm doing wrong? The code is below:
QUALIFY *;
UNQUALIFY [Cost Centre Code];
CIP:
LOAD Division,
[Business Unit],
[Divisional Scheme Detail],
[Board Scheme Detail],
[Provisional Scheme Number],
[Monitor Group],
[Monitor Scheme Group L1],
[Monitor Scheme Group L2],
[Cost Centre] as [Cost Centre Code],
[Spend Type
(Pay / Non-Pay / Income)] as [Spend Type],
[Scheme Lead],
[Clinical Impact Assessment RAG],
[Template Link
(CW and DH to develop)] as [Template Link],
[Scheme RAG
(Deliverability)] as [Scheme RAG (Deliverability)],
[Current Month RAG],
[Rec / Non Rec],
[Achieved (Y/N)],
M01P,
M01A,
M02P,
M02A,
M03P,
M03A,
M04P,
M04A,
M05P,
M05A,
M06P,
M06A,
M07P,
M07A,
M08P,
M08A,
M09P,
M09A,
M10P,
M10A,
M11P,
M11A,
M12P,
M12A,
CP01,
CP02,
CP03,
CP04,
CP05,
CP06,
CP07,
CP08,
CP09,
CP10,
CP11,
CP12,
CA01,
CA02,
CA03,
CA04,
CA05,
CA06,
CA07,
CA08,
CA09,
CA10,
CA11,
CA12,
[YTD Plan],
[YTD Act],
[YTD Var],
[CM Plan],
[CM Act],
[CM Var],
Row,
[Comments / Methodology],
[% Achievement at Current Month against plan],
BW,
BX,
BY,
BZ
FROM
(ooxml, embedded labels, header is 7 lines, table is [CIP Tracker]);
UNQUALIFY *;
CIP_Test:
CrossTable([Cost Centre Code], CIP.Plan, 3)
LOAD [CIP.Divisional Scheme Detail],
[CIP.Monitor Group],
[Cost Centre Code],
CIP.M01P,
CIP.M02P,
CIP.M03P,
CIP.M04P,
CIP.M05P,
CIP.M06P,
CIP.M07P,
CIP.M08P,
CIP.M09P,
CIP.M10P,
CIP.M11P,
CIP.M12P
Resident CIP;
I'd appreciate any advice?
Thanks
Dominic
Hi,
Here you already have a field called [Cost Centre Code]. and same your mentioned in the CrossTable() also.
What name you need to give for values like CIP.M01P, CIP.M02P... and values assciated to that?
Try with this code see your output
CIP_Test:
CrossTable([Cost Centre Code_CrossTable], CIP.Plan, 3)
LOAD [CIP.Divisional Scheme Detail],
[CIP.Monitor Group],
[Cost Centre Code],
CIP.M01P,
CIP.M02P,
CIP.M03P,
CIP.M04P,
CIP.M05P,
CIP.M06P,
CIP.M07P,
CIP.M08P,
CIP.M09P,
CIP.M10P,
CIP.M11P,
CIP.M12P
Resident CIP;
Hi,
Here you already have a field called [Cost Centre Code]. and same your mentioned in the CrossTable() also.
What name you need to give for values like CIP.M01P, CIP.M02P... and values assciated to that?
Try with this code see your output
CIP_Test:
CrossTable([Cost Centre Code_CrossTable], CIP.Plan, 3)
LOAD [CIP.Divisional Scheme Detail],
[CIP.Monitor Group],
[Cost Centre Code],
CIP.M01P,
CIP.M02P,
CIP.M03P,
CIP.M04P,
CIP.M05P,
CIP.M06P,
CIP.M07P,
CIP.M08P,
CIP.M09P,
CIP.M10P,
CIP.M11P,
CIP.M12P
Resident CIP;
Also if you want to know about how cross table functioning check here
Thanks, haven't used these in a while.