Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have some trouble again with numeric variables.
I have to divide one variable through another (to get an average of costs).
The issue is, in the table where one of these variables comes from (using the PEEK() function) I have formatted that in the German format with '#.##0,00'.
<=> Internally I guess QlikView uses the '.' as decimal_separator. what I know is that dividing this through another variable (an integer) does not work.
=> I tried to replace the ',' with the '.' to make it usable, but I don't quite know how to do that in the script - it doesn't work yet. I guess QlikView misinterprets the ',' as a parameter_separator. On the GUI, it's no issue at all to divide the one through the other, but in the script ...
Can someone help me there?
Thanks a lot!
Best regards,
DataNibbler
P.S.: I'm just trying reformatting the field with the '.' as decimal_separator, that might work - but the variable is also used in another calculation and I have to see if that still works ...
Henric,
In my request regarding issues with double quotes quoting, I was specifically adressing variable referencing:
... as an alternative to $(# vVar).
Any known issues here?
Thanks,
Stefan
Hmmm ... strange. Even with FIRST 10 it doesn't work - the LOAD is seemingly executed - it is complete in the log - and then it all stops.
From the table_viewer, I can see that in the original table from which I load RESIDENT, all the numbers are right-aligned all right. I will need to have a closer look tomorrow. I never encountered sth like this before ...
It will work. Just two small corrections:
Hence:
TEST:
LOAD F1, F2 INLINE
[F1, F2
"10,75", "3,3359" ];
Let vA = Peek('F1',0,'TEST');
Let vB = Peek('F2',0,'TEST');
Let vC = vA / vB +1;
Let vD = vC /2;
HIC
Hi all,
I finally got it now - but I still have no idea why it didn't work yesterday. The problem with the calculation was fixed and then the rest of the RESIDENT LOAD failed - but it is only 248.000 records or so and about 30 fields. And even with a FIRST 10 it failed ... now I created a much slimmer aux_table for that info and join it later and that way it works fine.
Very strange ...