Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

reference pointers for concatenated data

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.

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

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

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

7 Replies
Anonymous
Not applicable
Author

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


kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Try '_' instead of ':' to concatenate the two fields.

     I dont know why : sysmbol is creating a problem but '_' works.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

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.

Not applicable
Author

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.

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

I think you must submit this to QlikTech as a bug.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
jonathandienst
Partner - Champion III
Partner - Champion III

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

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Perfect. Thanks Jonathan.