Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikView forum consolidation is complete. Labels are now required. LEARN ABOUT LABELS
cancel
Showing results for 
Search instead for 
Did you mean: 
chinnuchinni
Creator III
Creator III

Load Distinct Values

Hi Every one,

I have 3 fields in a table A,B,C.

i need to load distinct of A values and also i  need  3 fields.

if i keep

load distinct A, B, C  from xyz;

it is giving only the distinct rows.

please help me on this.

Regards

Praveen

7 Replies
shraddha_g
Partner
Partner

Can you share sample data and expected output.

If you need Only Distinct A but with other 2 Fields. What will be the criteria to filter other 2 columns?

Because if load Distinct A and Left join B and C to A then again it will duplicate values from A.

chinnuchinni
Creator III
Creator III

Actually in A we have data 1,2,3,4,5,6.........some fields are repeated

In B we have data 1,2,3,.........which are repeated

In C we have date  which are associate dates which are repeated.

now i want the out put : distinct A values ,min(C) dates,associate B values

shraddha_g
Partner
Partner

then you can try

Load A,B, Min(C) as C

From XYZ

Group by A,B;

chinnuchinni
Creator III
Creator III

i tried but with that am not getting distinct A values. some values are repeating

shraddha_g
Partner
Partner

you can try  (not so sure about it)

Table1:

Load A &'-'& Min(C) as Key,

A,Min(C) as C

From XYZ

Group by A;

Left Join (Table1)

Load A &'-'& C as Key,

B

From XYZ;

antoniotiman
Master III
Master III

Try this

LOAD A,FirstSortedValue(DISTINCT B,C) as B,Min(C) as C

From ...

Group By A;

kiko1955
Contributor
Contributor

Datos:
Load * inline [
A,B,C
1,2,3
1,3,4
2,4,5
2,4,5
3,1,2
4,3,1
4,5,6
5,2,3
]
;
NoConcatenate
SinRepetir:
Load
A as AA,
B as BB,
C as CC
Resident Datos
Where Previous(A) <> A
Order by A