Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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,
Where and how do you want this output to be displayed?
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
Hello RS,
Please refer sample application attached herewith.
Hope this will help.
Regards!
Rahul Pawar
Hi I want to see this output in a pivot or a straight table.
regards,
Rahul
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,
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
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
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
Hi Rahul,
Try this expression in a straight table with dimension Vendor:
if(Count(distinct Region & '|' & Core & '|' &Amount)=1,'Yes','No')
Vendor | Match |
---|---|
A | No |
B | Yes |
Regards
Andrew