Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
na4raitda
New 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
Highlighted
Partner
Partner

Re: Checking two tables for identical fields.

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)

Highlighted
Digital Support
Digital Support

Re: Checking two tables for identical fields.

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 don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.