QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE

Who Me Too'd this topic

rothtd
Creator III
Creator III

Dual() forces distinct when numeric value is same?

I found yesterday that when using the dual function with differing text values and identical numeric values you get some interesting behavior:

// text values are different, numeric are same
Data:
LOAD
dual(F1, F2) as Value
INLINE [
F1, F2
Dog, 1
Cow, 1
Bird, 1
]
;

The result is that we have three records in our table, all identical: text=Dog, numeric=1.

pic 1.png

pic 3.png

If we ensure the numeric values are different we get what we would expect:

// text and numeric values are different
Data:
LOAD
dual(F1, F2) as Value
INLINE [
F1, F2
Dog, 1
Cow, 2
Bird, 3
]
;


pic 2.png



I’m going to guess that this behavior is due to QlikView internal compression algorithm of only storing a single value once and then pointing to it multiple times if needed. My guess is that in the first example QlikView recognizes all three records as identical due to their identical numeric properties, and thus stores it once and points to it three times (this explains why we get three records but they are all erroneously identical).

Anyone else want to weigh in on this curious behavior?

Who Me Too'd this topic