Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
Not applicable

cross tab load - field names must be uniqe

    this is hopefully a very simple one but has me stupmed. When i load the below i keep getting field names must be uniqe and it wont transform cy01 to cy12... i am trying to get them all into one column but have so far failed... any ideas?

Directory;

CrossTable(cross_selling_key, Data, 4)

LOAD Financial_Line,

     cross_selling_key,

     PYFY,

     YTD3,

     CY01,

     CY02,

     CY03,

     CY04,

     CY05,

     CY06,

     CY07,

     CY08,

     CY09,

     CY10,

     CY11,

     CY12

FROM

[Copy of Book1.xlsx]

(ooxml, embedded labels, table is Sheet1);

ta

Tags (1)
1 Solution

Accepted Solutions
Not applicable

Re: cross tab load - field names must be uniqe

great thanks.... although another question that comes off the back of this i need to put an if statment in as for PYFY and YTD3 i want the number to be 0 for for CY01, CY02 ect,  only where it is CY12 do i want the value that should be there., any ideas on what the if statment should be on the transform?

1.GIF

View solution in original post

7 Replies
shaik_basha
Contributor III

Re: cross tab load - field names must be uniqe

Hi,

   when your doing scripting that time you can change the field name,it will be work fine,

do one thing change field name at   script

   

CrossTable(cross_selling_key, Data, 4)  rename it as CrossTable(key,Data,4) it will be work.

Regards

shaik_basha
Contributor III

Re: cross tab load - field names must be uniqe

Hi,

   it is possible to get a sample data.

Regards

Not applicable

Re: cross tab load - field names must be uniqe

great thanks.... although another question that comes off the back of this i need to put an if statment in as for PYFY and YTD3 i want the number to be 0 for for CY01, CY02 ect,  only where it is CY12 do i want the value that should be there., any ideas on what the if statment should be on the transform?

1.GIF

View solution in original post

Not applicable

Re: cross tab load - field names must be uniqe

great thanks.... although another question that comes off the back of this i need to put an if statment in as for PYFY and YTD3 i want the number to be 0 for for CY01, CY02 ect,  only where it is CY12 do i want the value that should be there., any ideas on what the if statment should be on the transform?

Not applicable

Re: cross tab load - field names must be uniqe

data is as below, the actaully file is 500k lines long, but get it working on 1 line it will work on them all

Financial_Linecross_selling_keyPYFYYTD3CY01CY02CY03CY04CY05CY06CY07CY08CY09CY10CY11CY12
Other Operating IncomeCASH1554.591293.633.3561.9864.1462.76178.6391.36136.52188.7859.56187.97151.87106.71
shaik_basha
Contributor III

Re: cross tab load - field names must be uniqe

Hi,

 

    Please fiend the attachment of application.

Regards

Not applicable

Re: cross tab load - field names must be uniqe

not quite, i would like the output to look like the below if it is in a straight table.

if possible can you pos the code rather than send an example as ihavent switched my license over to this machine yet.

Financial_Linecross_selling_keydateAmountPYFYYTD3
Other Operating IncomeCASHCY013.3500
Other Operating IncomeCASHCY0261.9800
Other Operating IncomeCASHCY0364.1400
Other Operating IncomeCASHCY0462.7600
Other Operating IncomeCASHCY05178.6300
Other Operating IncomeCASHCY0691.3600
Other Operating IncomeCASHCY07136.5200
Other Operating IncomeCASHCY08188.7800
Other Operating IncomeCASHCY0959.5600
Other Operating IncomeCASHCY10187.9700
Other Operating IncomeCASHCY11151.8700
Other Operating IncomeCASHCY12106.711554.61293.6