Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
iahmadmca1
Contributor III
Contributor III

Mapping the two table with condition.

Team,

just I want to take the small help regarding the map two table with the condition.Pease finds the below code which I am using.and correct me.

Test:
Mapping
LOAD
[PCAD Job Number],
[Issuance Type]

FROM

(
qvd)
where [Issuance Type]='Scrub - OWM' or [Issuance Type]='Scrub - Rev Pro';


Scrub:
LOAD issuanceTypeId,
issuanceDescription,
Applymap('Test',issuanceDescription,Null()) as Issuance_Type,
workPlanDescription,
YellowSLA,
RedOperator,
RedSLA
FROM

(
qvd
);


Based on PCAD number I am mapping with two table and filtering the record based on [Issuance Type].

whatever data will filter after test table that should be mapped with second table scrub.Please check and give me some idea.

16 Replies
iahmadmca1
Contributor III
Contributor III
Author

Team,

sorry for the late reply, Please finds the attached excel sheet for sample output and let me any clarification.

Thanks,

Irshad Ahmad

iahmadmca1
Contributor III
Contributor III
Author

Ravi,

I want to Map the Test and scrub table based on below condition.

where [Issuance Type]='Scrub - OWM' or [Issuance Type]='Scrub - Rev Pro';

Sample output I have attached in the loop, Please let me know in case of any clarification.


Thanks,

Irshad Ahmad

mangalsk
Creator III
Creator III

Check this

test:

Mapping

LOAD Distinct

     [Issuance Type],

     [PCAD Job Number]

FROM

(
qvd)
where [Issuance Type]='Scrub - OWM' or [Issuance Type]='Scrub - Rev Pro';

scrub:

LOAD *,

ApplyMap('test',[Issuance Type]) as [PCAD Job Number];

LOAD

issuanceTypeId,

issuanceDescription as  [Issuance Type],

//ApplyMap([Issuance Type],issuanceDescription,'test') as t,

workPlanDescription,

YellowSLA,

RedOperator,

RedSLA

FROM

(
qvd
);

iahmadmca1
Contributor III
Contributor III
Author

Thanks Mangal,

I will check and let you know.

Thanks,

Irshad Ahmad

iahmadmca1
Contributor III
Contributor III
Author

Hi Mangal,

I have checked your code its working fine but I could see there is showing only two records.Please find the below screenshots for your reference.

Suresh2.jpg

key point:

1. In test table, I have 42 issuance type and PCAD number

2. Scrub table, i have 2 issuances type only no PCAD number

I need both table record as an output with the map.Please find the below output.

Suresh2.jpg

Thanks,

Irshad Ahmad

mangalsk
Creator III
Creator III

For this instead you should join as follows

test:

//Mapping

LOAD Distinct

     [Issuance Type],

     [PCAD Job Number]

FROM

(biff, embedded labels, table is Sheet1$);//where [Issuance Type]='Scrub - OWM' or [Issuance Type]='Scrub - Rev Pro';

Join

scrub:

//LOAD *,

//ApplyMap('test',[Issuance Type]) as [PCAD Job Number];

LOAD

issuanceTypeId,

issuanceDescription as  [Issuance Type],

//ApplyMap([Issuance Type],issuanceDescription,'test') as t,

workPlanDescription,

YellowSLA,

RedOperator,

RedSLA

FROM

(biff, embedded labels, table is Sheet1$);

iahmadmca1
Contributor III
Contributor III
Author

Thanks, Mangal