Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Differences of Two files to be shown in one object

Dear Friends/Gurus,

Thanks in advance for helping to resolve issue. Please find issue below:

We have two files data i,e file1 and file2 having similar data structure i.e 3 columns(PB,Dir,Mgr).

There is hirerachy in data. PB-->Dir-->Mgr

We want to show difference of file 1 and file2 data in one object only when same Mgr is present in file1 and file2 but having different PB or Dir i.e at manager level.

When Mgr is present in one table1 and not present in other table2 ...then difference need not be present in object.(we can ignore that record).


Issue is, it is showing differences correctly in object but when selections made in all tables i.e table1(file1data) ,table2(file2data)on

records it is not getting highlighted as there is no associations.

Please help , we need to highlight selections made in table 1 or table2 or table3 in corresponding objects it should show correspondingly in all objects.


Please find attached data,qvw with script and pic which explain issue.



1 Solution

Accepted Solutions
swuehl
MVP
MVP

Well, I can't see in your current QVW that you've even tried to implement something I'd suggested in your other thread

Attached mostly the same, using the two table files you've attached above.

I assume field3 is your Mgr field, and as I understood, your key field for comparison.

In table2, there are two lines for brady, so I am not sure which line should be valid here.

I've also created a simple table that should only show records / keys that are present in both tables, but different.

View solution in original post

11 Replies
swuehl
MVP
MVP

Maybe just follow the approach I suggested to your here:

Data Problem

If you use Mgr as key, it should be easy to create the flags as shown in the referenced thread that allow you to filter only records with Mgr present in both tables. Then also show which fields differ in which value.

In other words, I don't see a big difference to the other thread, the proposed solution should work here as well.

Not applicable
Author

Hi

As per your script,In list of difference(Only Mgr values) should shown which are not common like now its contain full list of Mgr values from both files as a difference but i want like which are not common in both files.Here Mgr is the Key

Below object should be like this as to show difference

list of difference-1

Clyde

swuehl
MVP
MVP

According to my script, the lines are flagged with something like 'only in one table' or 'fieldXXX Different?'.

Just filter these fields for records flagged with 'fieldXXX Different?' in the script (WHERE clause)

or front end (using just list boxes or set analysis in the chart) and you get what you want.

Not applicable
Author

Thanks

Not applicable
Author

hi

I am just trying to get only Manager Difference but its not working can you please help on this.

I given below exp in list box but it displays the full data(Manager values from both files) I don't want full combination. I want only different values as well Dir different values n PB values.

=if("AnyDifference?", Manager)

swuehl
MVP
MVP

Could you please upload your current QVW?

Not applicable
Author

Hi

please find the attached sample data

swuehl
MVP
MVP

Well, I can't see in your current QVW that you've even tried to implement something I'd suggested in your other thread

Attached mostly the same, using the two table files you've attached above.

I assume field3 is your Mgr field, and as I understood, your key field for comparison.

In table2, there are two lines for brady, so I am not sure which line should be valid here.

I've also created a simple table that should only show records / keys that are present in both tables, but different.

Not applicable
Author

hi

code is working fine but I want to show in list of diff  is whose who are not there in one list and there in one can be considered as Difference as per new requirement.

Below is the required object

List of difference-5

avinash

anil

brady

vihar

rohit