Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
varunreddy
Creator III
Creator III

Search all selected value in two fields and display the resultant value

Hi All,

I am having two tables Customers and Relations.

  • I have Cust_Id in customer table.

IP_ID_Num
100
200
300

  • I have Cust_Id and Relation ID in Relations table.

IP_ID_NumPRSL
100200
100300
200400
300

200

Association between these two tables is IP_ID_Num.

When we select 200 from IP_ID_NUM, I get to see 400 from PRSL.

But my requirement is when we select a value from IP_ID_NUM, I need to search for that value in both IP_ID_NUM and PRSL fields.

When I select 200 from  IP_ID_NUM, I need to see two rows.


1. IP_ID_NUM - 100 and PRSL - 200. (Because PRSL value is 200)

2. P_ID_NUM - 200 and PRSL - 400. (IP_ID_Num value is 200).


Can anyone please help me?


Thanks in advance!

13 Replies
varunreddy
Creator III
Creator III
Author

I don't see any attachment

Digvijay_Singh

Script -

Customer:

LOAD IP_ID_Num

FROM

[..\..\..\..\..\..\Downloads\Customer Relation.xlsx]

(ooxml, embedded labels, table is Customers);


CustRel:

LOAD

RowNo() as RelID, //Created ID field

IP_ID_Num,

     PRSL

FROM

[..\..\..\..\..\..\Downloads\Customer Relation.xlsx]

(ooxml, embedded labels, table is Relation);


Capture.PNG

varunreddy
Creator III
Creator III
Author

Found it.

Thanks for your help

Cheers,

Varun

Digvijay_Singh

Expression is -

Sum({<RelID=P(RelID)>+1<PRSL={$(=Only(IP_ID_Num))}>}PRSL)