Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

This formula ==> "Lat*pi ( )/180" doesn't display anything.

Hi all,

I have an Excel file with inside Lat and Long references. When I upload them in Qlikview everything is running OK. But when I try to make some operation with Lat and Long for istance writing in an Object "Lat*pi ( )/180" the column disappears. Can anyone please help me on tI eclose the file I'm using for the aim.

Thank you

Alberto

1 Solution

Accepted Solutions
rbecher
MVP
MVP

You probably have to set the decimal-seperator if '.' is not the default:

LOAD RAGDO,

     SAPDO,

     INDDO,

     CIVIDO,

     Ind,

     [Coordinate (LAT - LONG)],

     num#(Latitudine, '#.#', '.', ',')*pi()/180 as Lat,

     num#(Longitudine, '#.#', '.', ',')*pi()/180 as Long

FROM

[LAT&LONG.xlsx]

(ooxml, embedded labels, table is Sheet2);

- Ralf

Astrato.io Head of R&D

View solution in original post

6 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Ciao Alberto,

fai delle prove:

la prima è quella di verificare se il testo letto dall'excel è effettivamente un numero scrivi l'espressione latitude * 2 e verifica il risultato se non va il problema è legato al fatto che qlik non riconosce il valore nel campo latitude.

Se funziona invece verifica che la colonna abbia il formato decimale ...

Fammi sapere

rbecher
MVP
MVP

Hi Alberto,

the reason is that those fields are text in Excel. You have to use num#() in LOAD script to convert to number:

LOAD RAGDO,

     SAPDO,

     INDDO,

     CIVIDO,

     Ind,

     [Coordinate (LAT - LONG)],

     num#(Latitudine) as Latitudine,

     num#(Longitudine) as Longitudine

FROM

[LAT&LONG.xlsx]

(ooxml, embedded labels, table is Sheet2);

- Ralf

Astrato.io Head of R&D
Not applicable
Author

Thank you Ralf for your quick reply.

I tried your suggestion and also the script here below, but with no success. Could you please send to me the QVW? Probabily I'm omitting something.

Thanks a lot again

LOAD RAGDO,

    
SAPDO,

    
INDDO,

    
CIVIDO,

    
Ind,

    
[Coordinate (LAT - LONG)],

    
Num#(Latitudine)*pi( )/180 as Lat,

    
Num#(Longitudine)*pi( )/180 as Long

FROM

[LAT&LONG.xlsx]

(
ooxml, embedded labels, table is Sheet2);



Not applicable
Author

Grazei 1000 Alessandro,

ho provato il suggerimento di Ralf in linea col tuo del resto, ma senza successo. Cosa posso provare?

Un saluto

rbecher
MVP
MVP

You probably have to set the decimal-seperator if '.' is not the default:

LOAD RAGDO,

     SAPDO,

     INDDO,

     CIVIDO,

     Ind,

     [Coordinate (LAT - LONG)],

     num#(Latitudine, '#.#', '.', ',')*pi()/180 as Lat,

     num#(Longitudine, '#.#', '.', ',')*pi()/180 as Long

FROM

[LAT&LONG.xlsx]

(ooxml, embedded labels, table is Sheet2);

- Ralf

Astrato.io Head of R&D
Not applicable
Author

Hi Ralf.

Thanks a lot indeed for your help. Now it's running correctly.

Alberto