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

Row Level Match In Qlikview

Hi,

I have two table namely A and B.

Both the tables have same number of columns and same column name.

Table A contain version1 data and Table B contains version2 data.

A:

version      Vendor     Region     Core                    Amount

1                    A          North         North-East          100

1                    B          South        South-West         100

B:

version      Vendor     Region     Core                    Amount

2                   A          East          East                     100

2                   B          South        South-West         100

I want to compare row level data for each vendor ,for each version if it matches then yes else no.

Output:

version      Vendor     Region     Core                    Amount

1                    A           North         North-East          100

2                    A           East          East                     100

                                    No             No                       yes

1                   B           South        South-West         100

2                   B           South        South-West         100

                                   Yes          Yes                         Yes


how can I achieve this row level comparison in Qlikview?


Regards,

                  

14 Replies
tresesco
MVP
MVP

Where and how do you want this output to be displayed?

arvind_patil
Partner - Specialist III
Partner - Specialist III

Hi Rahul,


You can achieve this with the help of  If condition


Like

If( region= region 1, true, false) as RegionTrueFalse


create flag  for all values.



Thanks,

Arvind Patil

rahulpawarb
Specialist III
Specialist III

Hello RS,

Please refer sample application attached herewith.

Hope this will help.

Regards!

Rahul Pawar

rahulsingh12
Contributor III
Contributor III
Author

Hi I want to see this output in a pivot or a straight table.

regards,

Rahul

rahulsingh12
Contributor III
Contributor III
Author

hi,

If i have just two or 3 columns to compare then it is ok to go by your method but if I  have more than 250 columns to compare then writing the expression 250 times doesnot make sense.

Need to do something where it can generate it depending upon the number of column I have.

It could be that I have to do something at a script level,but not sure what

Regards,

rahulsingh12
Contributor III
Contributor III
Author

The if that you have written to compare the columns, is it possible to put a loop to take all the field value one by one.

Regards,

Rahul

rahulpawarb
Specialist III
Specialist III

I have written the sample code considering only two version for a  vendor. I believe we can write a script to as you asked.

Regards!

Rahul Pawar

rahulsingh12
Contributor III
Contributor III
Author

I am new to looping in Qlikview.

How can I write a for loop to pick each column name and put it in the if statement you have written.

if I can achieve that then I don't need to write n number of if statement.

Regards,

Rahul

effinty2112
Master
Master

Hi Rahul,

Try this expression in a straight table with dimension Vendor:

if(Count(distinct Region & '|' & Core & '|' &Amount)=1,'Yes','No')

Vendor Match
ANo
BYes

Regards

Andrew