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: 
a_travino
Contributor II
Contributor II

Using 'Select in field' action for multiple selections - Dynamic

Hello,

i have a little problem to select two different dynamic values from a field.

I solved with

(201510|201610)

but i want select

(max(ID_PERIOD) - 100|max(ID_PERIOD))

I would select the year-month current with the previous year for the same month.

Thanks!

1 Solution

Accepted Solutions
a_travino
Contributor II
Contributor II
Author

Thank you all for your answer.

The correct answer is ='(' & max(ID_PERIOD)-100 & '|' & max(ID_PERIOD)& ')'

View solution in original post

4 Replies
vinieme12
Champion III
Champion III

use variables

vPeriod1 = max(ID_Period) - 100

vPeriod2 = max(ID_Period)


Select in  Field

='('& chr(34) & vPeriod1 & chr(34) & ' | ' & chr(34) & vPeriod2 & chr(34) & ')'

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
vinieme12
Champion III
Champion III

if your Query is resolved please close the thread

Qlik Community Tip: Marking Replies as Correct or Helpful

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
marcus_sommer

I think you could use $-sign expansion like:

($(=max(ID_PERIOD) - 100)|$(=max(ID_PERIOD)))

For more see here: The Magic of Dollar Expansions.

- Marcus

a_travino
Contributor II
Contributor II
Author

Thank you all for your answer.

The correct answer is ='(' & max(ID_PERIOD)-100 & '|' & max(ID_PERIOD)& ')'