Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am actually trying to see how I can compare 2 different rows of same column in a same table using SET ANALYSIS.
Table1:
Id Name PropId
1 JOHN 1000
2 JAKE 1000
3 MIKE 10011
4 AMY 10011
I need to check if 'Propid' column having same value then display 'Name'
for example
=If( (If(Id=1 , PropId)) = (If(Id=2 , PropId)) , Name)
but it is not working. Please Help!
Thanks in Advance
Hi Sheela,
You can use swuehl 's code for getting your result.
=Concat({1<PropId=p(PropId)>}DISTINCT Name,', ')
and for top 5 results set max number to 5 in presentation tab.
Regards,
Anurag
Hi Neha,
I am not using licence version of qlikview. Please could you share code if possible?
Thanks
Sheela
As long as there is direct relation between ID and Name we cant not achieve this.
We can use Set analysis only for Aggregations. Not possible in this case.
Try to create two separate tables and those Name and ID should be related through ProdID.
Name:
LOAD
Name,
ProdId
FROM [lib://Test/Test.xls]
(biff, embedded labels, table is Sheet2$);
ProdID:
LOAD
ID,
ProdId
FROM [lib://Test/Test.xls]
(biff, embedded labels, table is Sheet2$);
Hi Anurag,
Thanks for reply!
It will work. But my requirement is different. I want to check equality condition like
If(Id=1, [propid]) = If(Id=2,[propid])
If it is true display name.But it is not working , i think syntax is not correct.
Please Help!
Thanks
Sheela
in fact, Syntax should this
If(Id=1, [propid], If(Id=2,[propid])
Or
If(Match(Id,'1') = Match(Id,'2'), [prodid])
Or else you may provide exact output you want to see
Hi Anil,
Thank you so much for reply!
I want to check for equality condition like - If Id 1's propid equal to Id 2's propid then display 'Name'.
Like
If ( If(Id=1,[propid] ) == If(Id=2,[propid]) ,Name )
Please help!
i am sure, This is disgusting. But you can try or provide sample data
If(Only({<Id = {'1'}>}propid) = Only({<Id = {'2'}>}propid), Name)
Hi Anil,
Yes! My requirement matches the expression but it is not working:(
Thanks
Sheela
I would suggest you to create dummy and share in excel so that we can work on it. I am sorry if you are not able to share the data set. This case, May be other can help you
Hi Anil,
Sample data.
Id | Prop ID | Name | |
1 | 3211 | singnaklong | |
2 | 3211 | donlaya | |
3 | 3211 | tiwari | |
4 | 3545 | rahul | |
5 | 3545 | mohammed | |
6 | 3545 | najma | |
7 | 3559 | Nina | |
8 | 3559 | benny | |
9 | 3559 | zhou | |
10 | 3559 | rex | |
11 | 3559 | stefi |
Thanks
Sheela