Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
BarryPollock
Contributor III
Contributor III

How to handle European decimal points when loading inline data

Hi, 

I'm working through the Qlik Sense Cookbook and I need to load the following data.  Our Qlik Sense application is set up to European units,  so it uses commas instead of decimals.  This is what I want to write in "American" units:

Load * INLINE [
Period, BounceRate
1, 0.26
2, 0.25
3, 0.24
];

Qlik sense isn't reading these as values.  I can get through the exercise by just making them whole numbers, but I'll need to know how to do this eventually.

Thanks!

1 Solution

Accepted Solutions
Ivan_Bozov
Luminary
Luminary

Hi! You can either change the DecimalSep in the Main section of the load script or go like this:

 

LOAD 
    Period,
    REPLACE(BounceRate,'.',',') AS BounceRate
INLINE [
Period, BounceRate
1,0.26
2,0.25
3,0.24
](DELIMITER IS ',');

 

vizmind.eu

View solution in original post

2 Replies
Ivan_Bozov
Luminary
Luminary

Hi! You can either change the DecimalSep in the Main section of the load script or go like this:

 

LOAD 
    Period,
    REPLACE(BounceRate,'.',',') AS BounceRate
INLINE [
Period, BounceRate
1,0.26
2,0.25
3,0.24
](DELIMITER IS ',');

 

vizmind.eu
marcus_sommer

My preferred approach to handle such cases is to quote such values like:

Load * INLINE [
Period, BounceRate
1, "0,26"
2, "0,25"
3, "0,24"
];

or to replace the load-delimiter - usually with a tab-char because they are often created with excel and copy & paste here - like:

Load * INLINE [

PeriodBounceRate
10,26
20,25
30,24


] (txt, delimiter is \t);


If both approaches aren't practically enough you could of course transform the values with a replace like mentioned from Ivan or also with a num(num#()) approach.

- Marcus