Announcements
The way to achieve your own success is the willingness to help somebody else. Go for it!
cancel
Showing results for
Did you mean:
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:

F1

1

2

1

];

Concatenate(TMP)

F1

3

3

4

];

With Distinct:

TMP:

F1

1

2

1

];

Concatenate(TMP)

F1

3

3

4

];

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

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:

F1

1

2

1

];

From Above It will give

Concatenate(TMP)

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

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)
MVP

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:

F1

1

2

1

];

Table:

NoConcatenate

F1

3

3

4

];

Concatenate(TMP)

Resident Table;

DROP Table Table;

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.

Community Browser