Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
marcorizzo
Contributor III
Contributor III

load inline

I want to create this table but I've got some problem with syntax.

newdimension:

LOAD * INLINE [

    newdim,

    "if(sum([Importo Effetto]>$(soglia7),'A','')"

];

Any help ?

Many thanks

Marco

10 Replies
sinanozdemir
Specialist III
Specialist III

Hi,

Just get rid of the extra double quotes and use chr(34):

newdimension:

LOAD * INLINE [

    newdim,

    chr(34) & if(sum([Importo Effetto]>$(soglia7),'A',' ') & chr(34)

];

Hope this helps.

rubenmarin

Hi Marco, the brackets of the field name will be interpreted as the en of the Inline table, you can also name the field with double quotes:

LOAD * INLINE [

    newdim

    if(sum("Importo Effetto">$(soglia7),'A','')

] (delimiter is ';');

If you need both, brackets and double quotes you can also use the ` simbol to enclose the Inline sentence and double-double quotes to force Inline to load the double quotes as part of the string:

LOAD * INLINE `

    newdim

    ""if(sum([Importo Effetto]>$(soglia7),'A','')""

` (delimiter is ';');

marcorizzo
Contributor III
Contributor III
Author

With your script I've got some error :

This is the result :

any suggestion ?

Thanks

marcorizzo
Contributor III
Contributor III
Author

Hi. With both script I've got this result

I expected a value as result.

Any suggestion ?

Thanks

Kushal_Chawda

try this

LOAD * INLINE "

    newdim

    if(sum([Importo Effetto]>$(soglia7),'A','')

";

settu_periasamy
Master III
Master III

Hi,

May be Like this..

newdimension:
LOAD Replace(Replace(newdim,'|','$'),'^',',') as newdim;
LOAD * INLINE "
newdim,
if(sum([Importo Effetto]>|(soglia7)^'A'^'')
"
;

Capture.JPG

rubenmarin

Hi Marco, to evaluate the expression you can use the $-expansion, please follow the attached example.

BTW, I added a parenthesys to close the Sum()

marcorizzo
Contributor III
Contributor III
Author

wich example ?

rubenmarin

The attached qvw:

The first list box has the newdim expression evaluated