Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
I am trying to load this cross table.
CrossTable(Value, Importe, 2)
LOAD F1 as Entity,
F2 as Account,
[<Entity Currency>],
[<Entity Curr Adjs>],
[<Entity Curr Total>],
[<Parent Currency>],
[<Parent Curr Adjs>],
[<Parent Curr Total>],
[Parent],
[Parent Adjs],
[Parent Total],
[Proportion],
[Elimination],
[Contribution],
[Contribution Adjs],
[Contribution Total]
FROM
It gives me the following script error:
Field not found - <Parent>
CrossTable(Value, Importe, 2)
I suppose there is a problem with the original name of the field '[Parent]' because of the use of the '[]'.
Is there any way to import the field with its original name using a special caracter or similar?
Thanks.
Hi,
What I'd say it's the problem is the "<" and ">". Make sure that these characters come from the database, otherwise clean them in the filed name.
Hope that helps.
Miguel
Please share the sample data.. i have tested field with <>.. and it is working
Hi,
the database original names are:
| <Entity Currency> |
| <Entity Curr Adjs> |
| <Entity Curr Total> |
| <Parent Currency> |
| <Parent Curr Adjs> |
| <Parent Curr Total> |
| [Parent] |
| [Parent Adjs] |
| [Parent Total] |
| [Proportion] |
| [Elimination] |
| [Contribution] |
| [Contribution Adjs] |
| [Contribution Total] |
If I get rid of "<" and ">" it gives me error from the very first field, that is:
| <Entity Currency> |
I think the problem start in [Parent].
Thanks
Sample.
Thanks
Hi,
Problem is with your database column headers...
in your database you have column heading with [Parent].. due to [] in your database qlilkview is not interpreting.
try to remove [] in your database.. i have removed the [] from the xl file and it is working fine..
HTH
Sushil
Hi,
I know, this is what I am trying not to do. I am looking for a sintaxis in QV which interpret these special field names right.
Thank you any way.
Hi,
You may need to parse your column names through a routine. The following is one method (you'll have to adjust for xlsx)...
//Get data with column names as top row of data
Data:
LOAD rowno() as rowRef, * FROM [test.xls] (biff, no labels, table is [2011$]);
//Convert top row data to column names
For c = 2 to NoOfFields('Data')
f1 = FieldName(c,'Data');
f2 = peek(f1,0,'Data');
if len(f2) > 0 then
Rename field '$(f1)' to '$(f2)';
ENDIF;
Next c
//Drop column names
right keep (Data)
load rowRef resident Data where rowRef > 1;
Drop field rowRef;
flipside