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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis - Get List of current selections into specific field

Hi Guys,

The following expression works, but How do I change the values in the list, to the list of selected values in a specific field?

=Sum( {$ < [SalesTargets.STMonth] = {'01', '02', '05'} > } SalesTargets.Quant)

=Sum( {$ < [SalesTargets.STMonth] = { IvMontNo } > } SalesTargets.Quant) I have tried this but it is not working.

Thanks in advance,

Aldo.



1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi,

P() is used in set analysis to get all possible values in one field while E() is used to get all excluded values for the specified field.

On the other hand, GetCurrentSelections will work, although if you use it for non-numeric fields you will need to quote values

chr(39) & GetFieldSelections(Field, chr(39) & ',' & chr(39), 12) & chr(39)


So the final result look like

'A', 'B', 'C'


Regards.

View solution in original post

4 Replies
Miguel_Angel_Baeyens

Hello Aldo,

You can use the following

=Sum( {$ < [SalesTargets.STMonth] = P(IvMontNo) > } SalesTargets.Quant)


Hope that helps.

Not applicable
Author

Hi there,

The following seems to be working:

=Sum( {<[SalesTargets.STMonth] = {$(=GetFieldSelections(IvMonthNo, ',',12))} >} SalesTargets.Quant)

I tried: =Sum( {$ < [SalesTargets.STMonth] = P(IvMonthNo) > } SalesTargets.Quant) but it is not working. What's the meaning of P ?
Thanks,
Aldo.


Miguel_Angel_Baeyens

Hi,

P() is used in set analysis to get all possible values in one field while E() is used to get all excluded values for the specified field.

On the other hand, GetCurrentSelections will work, although if you use it for non-numeric fields you will need to quote values

chr(39) & GetFieldSelections(Field, chr(39) & ',' & chr(39), 12) & chr(39)


So the final result look like

'A', 'B', 'C'


Regards.

Not applicable
Author

Thanks man.