Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

set analysis and selections on particular fields

Hi to all,

I have an associative cloud with N fileds and I would like to write an expression which result just depends by selections on 3 particular fields (f1, f2, f3) on N available (f1, f2, ..., fN).

I think it's necessary a set analysis. I writed  {1<f1=P() ,f2=P() , f3=P() >} but it's incorrect: the result depends also by selections on f4, ... fN while I don't want it!

Thanks in advance

stefano

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

Hopefully I got this right.  If not, hopefully the idea is clear enough that you can fix any syntax errors.

{<[$(=concat({1<$Field-={'F1','F2','F3'}>} $Field,']=,['))]=>}

View solution in original post

6 Replies
gandalfgray
Specialist II
Specialist II

The set expression you should use is:

{<f4=, f5=, ... fN=>}

(all fieldnames you want to ignore)

that is, just the fieldnames followed by an equalsign (and nothing more)

hth

/GandalfGray

Not applicable
Author

I known the solution {<f4=, f5=, ... fN=>} but N is a big number so I would like to use another way to do it!

brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi, Marson,

normally you don't need to enter a Set analysis string for showing selections. This is only necessary if you will show data NOT for selected data, p.e.

Sum({<FieldX=>} Sales)

this means, you get the sum of all data even with selections in all fields except FieldX.

Greetings from Munich

Martina

EVACO GmbH

brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi, marson,

what about creating in your script a For i=1 To N - Next statement and Concatenate those data in a variable.

Greetings from Munich

Martina

EVACO GmbH

johnw
Champion III
Champion III

Hopefully I got this right.  If not, hopefully the idea is clear enough that you can fix any syntax errors.

{<[$(=concat({1<$Field-={'F1','F2','F3'}>} $Field,']=,['))]=>}

Not applicable
Author

Thank you very much John, you reply is perfect!