Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
akpofureenughwu
Creator III
Creator III

sort data by apply map

Hello everyone,

I have two data in the form

Data Table

ridNameClassvbatchId
1John LeeSS3Asdioe12d
2Katty JennySS1dfoemd1340d
3Jhon BrownSS1Dfthgkdwo45ty
4Owen GreenDD6AFgeiwo56h

Verification Table

ridvbatchIdStatus
1Asdioe12dTrue
2dfoemd1340dFalse
3Dfthgkdwo45tyFalse
4AFgeiwo56hTrue

The design I am to visualize only data that their vbatchId status is equal to 'True'

I am trying using ApplyMap but it's not working. I need help 

1 Solution

Accepted Solutions
antoniotiman
Master III
Master III

Hi Akpofure,

maybe thsi

LOAD rid,
Name,
Class,
vbatchId
FROM
"https://community.qlik.com/message/1329296"
(html, codepage is 1252, embedded labels, table is @1);
Inner Join LOAD rid,
vbatchId,
Status
FROM
"https://community.qlik.com/message/1329296"
(html, codepage is 1252, embedded labels, table is @2)
Where Status
= 'True';

Regards,

Antonio

View solution in original post

7 Replies
Anil_Babu_Samineni

Try to show expected result from this table or post your Applymap code to better understand

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
akpofureenughwu
Creator III
Creator III
Author

ridNameClassvBatchId
1John LeeSS3Asdioe12d
2Owen GreenDD6AFgeiwo56h

since their vBatchId hold 'True in the verification table

Regards

simotrab
Creator III
Creator III

Hi,

applymap applies a mapping on data, the result should be something like:

Verification Table

ridvbatchIdStatus
1Asdioe12dTrue
2dfoemd1340dTrue
3Dfthgkdwo45tyTrue
4AFgeiwo56hTrue

ApplyMap ‒ QlikView

If you want to visualize only the True status you ought to add a Where clause in your load script.

However, if you need a mapping it should be something like:

Mapping:

Mapping Load Old, New Inline

[Old, New,

'False', 'True'

];

Load

rid

,vbatchid

,(ApplyMap('Mapping', Status) as Status

;

sql select

*

from Verification Table;


akpofureenughwu
Creator III
Creator III
Author

Simone.. Thanks but you didn't get the verification table well.. Please look at it carefully

simotrab
Creator III
Creator III

Thanks, my mistake, maybe this, joining the two table.


If you want only the True on the data table, looking the verification table, you could do this:

load

d.rid

,d.name

,d.class

,d.vBatchid

;

sql select

*

from data table d

join Verification table v on d.rid=v.rid

where Status = 'True'

;


antoniotiman
Master III
Master III

Hi Akpofure,

maybe thsi

LOAD rid,
Name,
Class,
vbatchId
FROM
"https://community.qlik.com/message/1329296"
(html, codepage is 1252, embedded labels, table is @1);
Inner Join LOAD rid,
vbatchId,
Status
FROM
"https://community.qlik.com/message/1329296"
(html, codepage is 1252, embedded labels, table is @2)
Where Status
= 'True';

Regards,

Antonio

vishsaggi
Champion III
Champion III

May be this?

As you have vbatchId as common field in both the tables auto concatenation happens then using straight table try like below:

Table1:

LOAD rid,

     Name,

     Class,

     vbatchId

FROM

[https://community.qlik.com/thread/271892]

(html, codepage is 1252, embedded labels, table is @1);

Table2:

LOAD rid AS Ver_rid,  // Rename this field so that the tables can connect using vbatchId field.

     vbatchId,

     Status

FROM

[https://community.qlik.com/thread/271892]

(html, codepage is 1252, embedded labels, table is @2);

Using straight table

Add dimensions: vbatchId, Name

Expression        : Only({< Status = {'True'} >}Status)

You will get below:

Capture.PNG