Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Talk to Experts, a LIVE Q&A Webinar. Bring your Qlik Sense Business questions on Aug. 4th. Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Luminary
Luminary

Re: How to handle European decimal points when loading inline data

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 ',');

 

View solution in original post

2 Replies
Highlighted
Luminary
Luminary

Re: How to handle European decimal points when loading inline data

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 ',');

 

View solution in original post

MVP & Luminary
MVP & Luminary

Re: How to handle European decimal points when loading inline data

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