Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Micki
Creator
Creator

Copy selected value from one field to another set analysis

Hi folks,

Have 2 tables that are not linked. 

My case:

- user select value from T1 field1 - 22-12-20

- user select value from T2 field2 - 23-12-20

And now I need to copy value from T2 field2 - 23-12-20 to  T1 field1 - 22-12-20 in set analysis

So like SUM( {< field1= {'22-12-20, 23-12-20'} >}items)

Does it possible? 

Thank you in advance 

3 Replies
PrashantSangle

yes it is possible. use getfieldSelection()

 

Regards,

Prashant Sangle

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Micki
Creator
Creator
Author

@PrashantSangle , good to know that is possible:), could you please provide an example or fix my example

What i Did: 

Sum({<[Field1]={"$(var), $(var1)"}>} items) 

Var =Replace(GetFieldSelections([Field1]),', ','","')

Var1 =Replace(GetFieldSelections([Field2]),', ','","')

So when i select one date from Field 1 and another from Field 2 it's not showing the  anything

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

The Set Analysis function used to filter from a not-linked field is P(). 

SUM( {< field1 = P(field2)>}items)

In your case it looks like you want to match selections from both field1 and field2. So:

SUM( {< field1 = P(field1)> + < field1 = P(field2)>}items)

or

SUM( {$ + < field1 = P(field2)>}items)

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com