Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Wondering why I am seeing the wrong data displayed when using the script below. Basically I have a straight table using the data from TEST and the concatentation for the 'check' field appears to have the same value displayed for all three rows: 210:63680
The only way I can see this happening is that somehow the QlikView reference pointer for the 'check' field is the same for all three rows!
Surely there has to be another reason for this otherwise it suggests serious key collision issues.
DATA:
LOAD * INLINE [
aTmp, bTmp, cTmp
1, 63680, 210
2, 2360, 1232
3, 2360, 1232
];
TEST:
LOAD
aTmp as a,
bTmp as b,
cTmp as c,
`bTmp`&':'&`cTmp` as check
RESIDENT DATA;
Note: problem is on 11.00.11414.0 SR2 64 bit version
I've attached a basic example QVW with the problem.
Hi
Not a bug, just slightly unexpected behaviour. When QV reads the values 210:63680 and 1232:2360, it sees the colon and deduces that these are times. After normalising the number of minutes, these both equal 1271 hours and 20 minutes, so they are equal. The solution is to force QV to consider them as text, like this:
TEST:
LOAD
aTmp as a,
bTmp as b,
cTmp as c,
Text(cTmp & ':' & bTmp) as check
RESIDENT DATA;
That fixes the problem.
Jonathan
do not use ' ' while concatenating fields 'bTmp`&':'&`cTmp` as check
instead use
bTmp &':'& cTmp as check
let me know it works or not?
Regards,
anant
Hi,
Try '_' instead of ':' to concatenate the two fields.
I dont know why : sysmbol is creating a problem but '_' works.
Regards,
Kaushik Solanki
anant,
Thanks for the quick reply. Unfortunately still no joy.
By the way I wrote that expression wrong in the script above it should have been the other way round (but its right in the QVW file):
cTmp &':'& bTmp as check
Strange thing is that if I swap the inline table values around (see below) I get all of the 'check' values as 1232:2360
DATA:
LOAD * INLINE [
aTmp, bTmp, cTmp
1, 2360, 1232
2, 2360, 1232
3, 63680, 210
];
TEST:
LOAD
aTmp as a,
bTmp as b,
cTmp as c,
cTmp &':'& bTmp as check
RESIDENT DATA;
My straight table is really simple just the column 'a' as the dimension and the rest of the fields as expressions.
I found the same thing myself when I tried it with a semi-colon but I'm still a bit worried that it suggests an underlying issue.
I think you must submit this to QlikTech as a bug.
Regards,
Kaushik Solanki
Hi
Not a bug, just slightly unexpected behaviour. When QV reads the values 210:63680 and 1232:2360, it sees the colon and deduces that these are times. After normalising the number of minutes, these both equal 1271 hours and 20 minutes, so they are equal. The solution is to force QV to consider them as text, like this:
TEST:
LOAD
aTmp as a,
bTmp as b,
cTmp as c,
Text(cTmp & ':' & bTmp) as check
RESIDENT DATA;
That fixes the problem.
Jonathan
Perfect. Thanks Jonathan.