Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
MindaugasBacius
Partner - Specialist III
Partner - Specialist III

Concatenate and distinct

Hei,

I've faced an interesting issue.

While making Concetanate I am also using Distinct of the table I do concatenate.

Unfortunately, after that all the values have become Distinct in whole table.


There is an example.

Without Distinct:

TMP:

LOAD * INLINE [

    F1

    1

    2

    1

];

Concatenate(TMP)

LOAD * INLINE [

    F1

    3

    3

    4

];

Screenshot_2.jpg

With Distinct:

TMP:

LOAD * INLINE [

    F1

    1

    2

    1

];

Concatenate(TMP)

LOAD Distinct * INLINE [

    F1

    3

    3

    4

];

Screenshot_3.jpg

I would like to understand the fundamentals of this issue. Why is that so?

Thank you!

1 Solution

Accepted Solutions
Anonymous
Not applicable

4 Replies
Anonymous
Not applicable

Anil_Babu_Samineni

First of all, You need to understand what / how will work for DISTINCT

So, Here For first case it could be definitely correct

For Second one, I can split into few ways

TMP:

LOAD * INLINE [

    F1

    1

    2

    1

];

From Above It will give

Concatenate(TMP)

LOAD Distinct * INLINE [

    F1

    3

    3

    4

];


So, For second inline memory it takes as DISTINCT for all F1 Values it will consider as all values which concatenate the first valies


So, Finally It takes like below for all values as DISTINCT function


F1

1

2

3

4

So, From this you can count(F1) then figure it out.

I am not the good explain person but this is the case finally it consider DISTINCT for whole Field due to Concatenate of all Fields which is Associated.

HTH

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
sunny_talwar

Not entirely sure it happens. But my guess is that since its the same table TMP it assumes to distinct across the whole table. The work around would be....

TMP:

LOAD * INLINE [

    F1

    1

    2

    1

];

Table:

NoConcatenate

LOAD Distinct * INLINE [

    F1

    3

    3

    4

];

Concatenate(TMP)

LOAD *

Resident Table;

DROP Table Table;

omkarvamsi
Creator
Creator

to my idea,

first the qlikview load two tables ,after two tables are appended to one table the Distinct on F1 implemented,

thats why we can see only distinct values when using DISTINCT.