Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
danfuer123
Contributor
Contributor

Loading a Value

Hi there,

 

trying to load a calculated value, it is a decimal value, seperated with a comma.   for example (0,25555) and getting always that error! 

What am I doing wrong??

Also tried the num Function, and getting the same problem!!

 

 

It's obvious that a decimal load is somehow not working !

You can see the Error an the Source code below!! 

 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Syntax error
Unexpected token: ',', expected one of: ')', 'OPERATOR_PLUS', 'OPERATOR_MINUS', 'OPERATOR_MULTIPLICATION', 'OPERATOR_DIVISION', 'OPERATOR_STRING_CONCAT', 'like', ...
aa:
LOAD
3809682          as Auftrag_ID1,
text('0,2223')   as dauer_Tag_1,
text(0>>>>>>,<<<<<<29166666666424) as dauer_Tag_2
//$(dauer_dat) as dauer_datum
Resident Incident_1 where 1 = RecNo()



++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


Source Code
aa:
LOAD
$(ID1)                  as Auftrag_ID1,
text('0,2223')          as dauer_Tag_1,
text($(dauer_erst_Tag)) as dauer_Tag_2
//$(dauer_dat)          as dauer_datum
Resident Incident_1 where $(i) = RecNo();


3 Replies
edwin
Master II
Master II

could it be you have a different setting for decimals?  check this line in the first few lines of your script:

SET DecimalSep='.';

if you want to use comma, just replace that otherwise change the decimal separator in the NUM function:

Num - script and chart function ‒ QlikView

 

MayilVahanan

Hi @danfuer123 

Try with single quotes in the variable declaration.

text('$(dauer_erst_Tag)') as dauer_Tag_2

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
danfuer123
Contributor
Contributor
Author

Thank you guys!!

The solution is :                               '$(dauer_dat)'            as Inc_Dauer_Datum_hh

dauer_dat:  is a decimal value i.e.:     0,0001

I haven't put them into the  quotes    ' ', that was the only case!