Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Anyone can help me fix this problem ? When I load data from database, I have a field (the value is A,1,N1,B,01,N2),But when you load,the value will be change to A,1,1,B,1,N2.
LOAD * INLINE [
Group_ID, Group_Name
A, one
1, two
N1, three
B, four
01, five
N2, six
];
another script has different problem,just show 4 records
LOAD * INLINE [
Group_ID, Group_Name
A, A
1, 1
N1, N1
B, B
01, 01
N2, N2
];
I can reproduce this problem on my computer now. It is caused by the number format in the script. If you change the line where it says
SET MoneyFormat='NT$#,##0.00;-NT$#,##0.00';
to
SET MoneyFormat='$#,##0.00;-$#,##0.00';
then it will work properly
I will raise this issue as a potential bug in our system.
HIC
Try usign Text():
LOAD text(vGroup_ID) as Group_ID, * INLINE [
vGroup_ID, Group_Name
A, one
1, two
N1, three
B, four
01, five
N2, six
];
Regards
Hi,
By default qlikview recognizes its a number then make it to number format.
Here you 01 which is number so it makes it as 01.If you need as it is you have to use text()
LOAD Text(Group_ID) as Group_ID, Group_Name INLINE [
Group_ID, Group_Name
A, one
1, two
N1, three
B, four
01, five
N2, six
];
LOAD Text(Group_ID) as Group_ID, Text(Group_Name) as Group_Name
INLINE [
Group_ID, Group_Name
A, A
1, 1
N1, N1
B, B
01, 01
N2, N2
];
Why 1,01 and N1 is the same? 1 and 01 is the sam. I can accept it, but N1 ?
The other question, when I load data from database , if Group_ID is varchar type, it's seem has the same problem. So I need add Text() at all fields ? When the application get the data structure, it can analysis which fields is text type. Why don't set it to default ?
QlikView Ver. 11.00.11282.0409
I have attached a picture of the data that I get when I run your script.
In it you can see that N1 does not change value. You can also see that when QlikView has interpreted a field value as a number, it will by default be right-aligned, whereas a text will be left-aligned. I.e. a single field can have a mix of text and numbers. If you want to force QlikView to always interpret the field numbers as text, then you should use the Text() function as Celambarasan suggests. But it is not what you want as default, since many fields indeed are numeric.
HIC
I can see that also N2 is interpreted numerically (right-aligned) so something in your script makes N1 and N2 be interpreted as numbers - which they shouldn't be. Can you post your application?
HIC
This is my system info.
========================= Document Info ==========================
Document E:\Sample Data\Revenue\testError.qvw
Connection Local
DecimalSep Doc="."(2E) Sys="."(2E)
ThousandSep Doc=","(2C) Sys=","(2C)
ListSep Doc=","(2C) Sys=","(2C)
MoneyDecimalSep Doc="."(2E) Sys="."(2E)
MoneyThousandSep Doc=","(2C) Sys=","(2C)
MoneyFmt Doc="NT$#,##0.00;-NT$#,##0.00" Sys="NT$#,##0.00;-NT$#,##0.00"
TimeFmt Doc="hh:mm:ss" Sys="hh:mm:ss"
DateFmt Doc="YYYY/MM/DD" Sys="YYYY/MM/DD"
TimestampFmt Doc="YYYY/MM/DD hh:mm:ss[.fff]" Sys="YYYY/MM/DD hh:mm:ss[.fff]"
Document File Format 0 (6000)
Saved in Version 11.00.11282.0409
Client NT Name
Access ADMIN
License -
Document License Status ALLOWED
======================= Object Cache Info ========================
Object Cache Limit (MB) 786.18
========================= QlikView Info ==========================
Client Build Number 11.00.11282.0409
Server Build Number -
QlikTech Product QlikView 64-bit Edition (x64)
License Key [Personal Edition]
PE Recoveries Remaining 0
CPU Target x64
=========================== INI Values ===========================
BookmarkDocument 1
CanDynamicUpdate 1
CollabPaneSplitPrecentage 0.182222222222222
CollabPaneVerticalSize 160 740
CurSelFirstColWidth 71
CurrentQVConnect32Loc C:\Program Files (x86)\QlikView\QvConnect32.EXE
CurrentQVConnect64Loc C:\Program Files\QlikView\QvConnect64.EXE
DebugDlgHeight 818
DebugDlgWidth 1600
DefaultRefLineColor 33587200
DefaultRefLineWidth 4
DontShowConfirmToShowStartPageAgain 1
ExpOvwColWidths 60,144,60,365,120,100,180,300
FirstUserExperience 0
HatchedBrushes 0
InstalledLIBID110 {15B258E8-415E-11D1-934D-0040333C91CC}
InterfaceLanguage English
LA_SmoothLine 1
LastViewedUpdate 384B8F6E-487F4CAB-AC50CA74-1318D3FA-94297A25
LoadFollowing 1
MarginTop 20
NextWebUpdateDate 41028
SMTP_Address marky@accton.com.tw
SMTP_Encoding utf-8
SMTP_MIME 1
SMTP_Name mark
SMTP_Server mail2
SavedCustomColors FFFFFF,FFFFFF,FFFFFF,FFFFFF,FFFFFF,FFFFFF,FFFFFF,FFFFFF,FFFFFF,FFFFFF,FFFFFF,FFFFFF,FFFFFF,FFFFFF,FFFFFF,FFFFFF
ShowStartPageOnStartup 0
ShowSystemTables 0
ShowSystemVariables 1
ShowUserDsn 1
ShowWizIntroThemeMaker 0
Utf8FileDlgPathOpenDoc E:\Sample Data\Revenue2\
Utf8FileDlgPathSaveDoc E:\Sample Data\Revenue
======================= Local System Info ========================
Operating System Windows 7 Ultimate Service Pack 1 (64 bit edition)
Operating System Version 6.1.7601
Wow64 mode Not using Wow64
IE Version 9.0.8112.16421
MDAC Version 6.1.7601.17514
MDAC Full Install Version 6.1.7601.17514
ComCtl32 version 6.16.7601
Current Theme C:\windows\resources\themes\Aero\Aero.msstyles
Graphics 1 1600*900 pixels. 1 Monitors.
Graphics 2 32 Bit Color Depth. 96 XDpi. 96 YDpi.
Local Time 2012-04-30 18:34
GMT Time 2012-04-30 10:34
Country 886 台灣 Taiwan
Language 0404 中文 (繁體,台灣) Chinese (Traditional)
Physical RAM(MB) 7861
VMCommitted(MB) 55
VMAllocated(MB) 317
VMFree(MB) 2010
VMLargestFreeBlock(MB) 2010
Number of CPUs 4
CPU 0 Intel(R) Core(TM) i5 CPU M 540 @ 2.53GHz 2526MHz
CPU 1 Intel(R) Core(TM) i5 CPU M 540 @ 2.53GHz 2526MHz
CPU 2 Intel(R) Core(TM) i5 CPU M 540 @ 2.53GHz 2526MHz
CPU 3 Intel(R) Core(TM) i5 CPU M 540 @ 2.53GHz 2526MHz
It's the formatting of your currency causing it - I have replicated the error. Change it to $ only and it loads fine.
flipside
EDIT:
Like this ...
SET MoneyFormat='$#,##0.00;-$#,##0.00';
... this sounds like a bug as your currency format is being picked up from your system settings, but you should be able to work around it now.
EDIT 2:
Can you use something like the following to get round it (in all your documents)
SET MoneyFormat='(NT)$#,##0.00;-(NT)$#,##0.00';
I can reproduce this problem on my computer now. It is caused by the number format in the script. If you change the line where it says
SET MoneyFormat='NT$#,##0.00;-NT$#,##0.00';
to
SET MoneyFormat='$#,##0.00;-$#,##0.00';
then it will work properly
I will raise this issue as a potential bug in our system.
HIC
It's all right. Thank you very much.