Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

how to compare two qvds

Hi

how to compare the records of two similar qvds(Table with 130 filelds of Same Name in each qvd ), when there is no Primary key

Is it possible to compare these stuff.

John

4 Replies
ramoncova06
Partner - Specialist III
Partner - Specialist III

what do you mean by compare ?

are you referring to the content itself  or the number of rows, fields, etc ... ?

if you want to identify if they are any missing rows from each other then you need to identify a key field and you could apply where exists or joins

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

I'd suggest loading both tables using QUALIFY (to avoid linking on all fields) while adding a new field with the row number.

Then, you can compare row by row.

Alternatively, you can UNQUALIFY the combination of fields that you want to compare by (for example, Product, Customer, and Date), and compare other fields based on the matching combinations of your key fields.

You'd need to quality and unqualify different sets of fields, depending on the needs of your comparison.

best,

Oleg Troyansky

QlikView Your Business: An expert guide to Business Discovery with QlikView and Qlik Sense

stigchel
Partner - Master
Partner - Master

You can create a primary key by using Autonumberhash where you include the fields that make your records unique e.g.

autonumberhash128(EventDate, Description);

From the help


autonumberhash128(expression {, expression})

Calculates a 128-bit hash of the combined input expression values and the returns a unique integer value for each distinct hash value encountered during the script execution. This function can be used e.g. for creating a compact memory representation of a complex key.

Example:

autonumberhash128 ( Region, Year, Month )

petter
Partner - Champion III
Partner - Champion III

Actually if you do a load script a join on the common fields (which is automatic in QlikView) should reveal the differences and similarities between the tables.