Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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
Anonymous
Not applicable

Hello  Ahmad

Please share sample data to work on this

iahmadmca1
Contributor III
Contributor III
Author

okay, Mahesh let me share.

iahmadmca1
Contributor III
Contributor III
Author

Mahesh,

Please find the below sample data with I need to map with each other.test.jpg

based on this two table I need a result.

Thanks,

Irshad Ahmad

Anonymous
Not applicable

HI Ahmed

Can you Please  share  two tables data in excel , so that  it could be easy for me to work on this .

And also can you share  accepted output .

Thanks

Mahesh.

balar025
Creator III
Creator III

Hi Irshad,

Code you have written will always give NULL() as Issuance Type. Because in mapping table , first column is always Key and second is value. So,

Applymap('Test',issuanceDescription,Null()) this line of code will check issuanceDescription in [PCAD Job Number] column, which will never match. And end result will be always NULL().

This might help you.

Regards,

Ravi

Peter_Cammaert
Partner - Champion III
Partner - Champion III

It appears that field issuanceDescription of table scrub contains the same values as the output of the Mapping Table. Mapping tables cannot be used in two directions, for example to translate the second mapping table column into the first one. So the applymap call in your second load is not entirely correct.

Moreover, from your description it isn't clear what you are trying to accomplish. Can you give an example of your input data (both tables) and what the result of the transformation should be? Remember that QlikView is unable to parse data from screenshots. It would be easier if you could supply the data in csv or xlsx format.

iahmadmca1
Contributor III
Contributor III
Author

Thanks, Ravi.

iahmadmca1
Contributor III
Contributor III
Author

Hi Team,

I attached the sample Excel data for your reference.please check it and let me know.

sample output which I am expecting:

Issuance Type Pcad NumberActive AccountOrder status
Scrub - OWMDSOET-20170418-00081ActivePending
Scrub - Rev ProDSOET-20170420-00285Activepending
Scrub - OWMDSOET-20170708-00018Activepending
Scrub - Rev ProF_MS-20170620-02821InActivepending

Thanks,

Irshad Ahmad

balar025
Creator III
Creator III

Hi Irshad,

What is your expectation because i am not able to visualize your output?

Because as per your latest reply, i am seeing multiple PCAD Number against single Issuance Type. How your checking that and what is Active account and Order Status?

Because by looking at data. It looks insufficient.

********All you PCAD number is assigned to same issuance type************

   

DSOET-20170418-00081Scrub - OWM1
DSOET-20170420-00285Scrub - OWM1
DSOET-20170708-00018Scrub - OWM1
F_MS-20170620-02821Scrub - OWM1

Regards,

Ravi Balar