Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
corber64
Contributor II
Contributor II

Qlikview - Compare 2 Excel files making evident the values ​​of the columns of Tab2 that are not present on Tab1

Hello,

on Qlikview, I would need to compare 2 excel files making evident the values ​​of the columns of Tab2 that are not present on Tab1.

In practice I have to import Bills of Materials onto an ERP (Tab2) but I first want to check that the relative ITEMS (Tab1) are already present, to avoid import errors.

corber64_0-1706018561981.png

 

corber64_1-1706018593283.png

 

Result to obtain: a single column table with the ITEMS non present on Tab1.

In this specific situation:

Value E   ( which refers to the FATHER column )

Value D   ( which refers to the CHILD column )

The information FATHER and/or CHILD is not necessary

corber64_2-1706018646125.png

How should I write the instructions in the script?

Would someone kindly write me the SCRIPT?

 

Thanks in advance... regards

 

 

Labels (1)
4 Replies
dataexplorer
Contributor III
Contributor III

Maybe something like this

MapTabA

Mapping Load Distinct

[ItemTabA]

'TabA' as Check

From

TabA

TabBTable:

load

//preceeding load

*

where [Material In Tab A] = 'No';

load

[ItemTabB]

applymap('MapTabA',[ItemTabB],'No') as [Material In Tab A]

From

TabB

Drop field [Material In Tab A]

corber64
Contributor II
Contributor II
Author

Thanks for your answer, but I'm not able to write what you kindly suggested.

Would you be so kind to send me the script that refers to the specific situation ?

 

 

Thanks, bye

corber64
Contributor II
Contributor II
Author

Would someone kindly write me the SCRIPT?

Thanks

dataexplorer
Contributor III
Contributor III

@corber64  Here is the script I used to flag the entries. 

Script

 

 

[Tab1]:
LOAD * INLINE 
[
Item
A
B
C
](delimiter is ',');

mapTab1:
	Mapping Load Distinct
      [Item],
      'x' as check
    Resident [Tab1];

[Tab2]:
	Load
    
		*,
        ApplyMap('mapTab1',Father,'n') as FatherCheck,
        ApplyMap('mapTab1',Child,'n') as ChildCheck;
        
    ;

LOAD * INLINE 
[
Father,Child
A,B
A,C
A,D
E,B
](delimiter is ',');

Exit Script;

 

 

With the flags created, I can flag values that are unique or does not exist in Tab1

Let me know if this is what you are looking for

Output

dataexplorer_0-1706821863881.png