Qlik Community

Ask a Question

New to QlikView

If you’re new to QlikView, start with this Discussion Board and get up-to-speed quickly.

Announcements
Welcome to our newly redesigned Qlik Community! Read our blog to learn about all the new updates: READ BLOG and REPORTED ISSUES
cancel
Showing results for 
Search instead for 
Did you mean: 
Partner
Partner

how to display only differenet value from to table...

hello everyone,

i have one simple question can u help me out.

suppose i have two table as shown in below:

tableA:

LOAD * INLINE [

    name, value

    a, 1

    b, 2

    c, 3

    d, 4

    e, 5

    f, 6

];

tableB:

LOAD * INLINE [

    name, value

    c, 3

    d, 4

    e, 5

];

now i want to display only uncommon name and vale.

Expected output:

name  value

a             1

b             2

f              6

thanks in advance.

1 Solution

Accepted Solutions
Specialist III
Specialist III

do you want to do this at script or front end ? do you still want to keep both tables ?

here is a quick way of doing this, though will only keep table A with the non found values

mapping

tableB:

LOAD * INLINE [

    name, value

    c, 3

    d, 4

    e, 5

];

tableA:

Load

name,

value

where applymap('tableB', name,0) = 0

LOAD * INLINE [

    name, value

    a, 1

    b, 2

    c, 3

    d, 4

    e, 5

    f, 6

];

View solution in original post

5 Replies
Specialist III
Specialist III

do you want to do this at script or front end ? do you still want to keep both tables ?

here is a quick way of doing this, though will only keep table A with the non found values

mapping

tableB:

LOAD * INLINE [

    name, value

    c, 3

    d, 4

    e, 5

];

tableA:

Load

name,

value

where applymap('tableB', name,0) = 0

LOAD * INLINE [

    name, value

    a, 1

    b, 2

    c, 3

    d, 4

    e, 5

    f, 6

];

View solution in original post

Specialist III
Specialist III

here using the exists function, I change the name label on tableB


tableA:

LOAD * INLINE [

    name, value

    a, 1

    b, 2

    c, 3

    d, 4

    e, 5

    f, 6];

tableB:

LOAD * INLINE [

    name1, value

    c, 3

    d, 4

    e, 5];

noconcatenate

tableC:

load

name,

value

resident  tableA

where not exists (name1, name);

Partner
Partner

tableB:

LOAD * INLINE [

    name1, value1

    c, 3

    d, 4

    e, 5

];

tableA:

LOAD * INLINE [

    name2, value2

    a, 1

    b, 2

    c, 3

    d, 4

    e, 5

    f, 6

]

WHERE Not Exists(name1, name2);

DROP Table tableB;

MVP
MVP


I added some records in tableB and checked on name and value



1.png


tableA:

LOAD *, 1 as fromA INLINE [

    name, value

    a, 1

    b, 2

    c, 3

    d, 4

    e, 5

    f, 6

];

//tableB:

join (tableA)

LOAD *, 1 as fromB INLINE [

    name, value

    c, 3

    d, 4

    e, 5

  x, 20

  y, 21

  z, 22

];

left join (tableA)

LOAD

  name, value,

  if(rangesum(fromA,fromB)=1, 1) as uncommon

Resident tableA;

Partner
Partner

thanks everyone its working fine...

thanks again