Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
na4raitda
Contributor
Contributor

Checking two tables for identical fields.

Hi,

For example, I have two tabels, and they have field names like this.

Table1 : JournalNumber/Amount/PostingDate

Table2 : JournalNumber/JournalType/Date1/Date2

'PostingDate' and 'Date1' seems to be identical fields only with different names.

I want to check whether they are 'really' Identical, and if they are, I want to get rid of one of the fields.

Is there any efficient way to check whether they are identical?

It's quite urgent and would really appreciate your help. Thanks a lot.

Labels (1)
2 Replies
Zhandos_Shotan
Partner - Creator II
Partner - Creator II

Hi

Im not sure, without looking at yout table contents, but if JournalNumber is Unique key for both tables you can check it this way:

Load tables as is.

Create table with Dims: JournalNumber, 'PostingDate' and 'Date1' 

Add measure: =PostingDate=Date1

Check table record count in status bar and totals by measure

OR another way, create text object with:

=Count({<JournalNumber={"=PostingDate=Date1"}>}JournalNumber)

and compare with =Count(JournalNumber)

Brett_Bleess
Former Employee
Former Employee

You would likely need to use the RowNo() or RecNo() functions in the load to be sure every row is actually unique in that regard, then it should be as simple as just using some List Box objects on those fields along with the resulting Row or Rec No field to see for sure if you have true dups or not...  Do not believe I am oversimplifying, but this should kick things, so if someone else sees a flaw in my logic, they may be able to point that out.

https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Scripting/Count...

https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Scripting/Count...

Hopefully this at least gives you something else to try if you have not already figured things out here.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.