
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Set Analysis with multiple value variable
Hi!
I have a sum using set analysis, but one of the criteria is this: BPLId={'$(Branch)'}
Where Branch is a variable that currently contain the number 1.
But I'd like to be able to use two value: 1 and 3.
I know if I make my set analysis criteria like BPLId={'1,3'} it works, but I cant figure out how to make it work using the variable instead.
Maybe I have to set the values in the variable with some kind of concatenation?
And I should mention that this variable is created manually on the app variables menu, not in the script.
Can anyone shed a light on this?
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May be enter like this
1, 3
and then use it like this
BPLId = {$(=Chr(39) & Replace(Branch, ',', Chr(39) & ',' & Chr(39)) & Chr(39))}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It needs to have single quotes around individual Branch
BPLId={'1,3'} -> Incorrect
BPLId={'1', '3'} -> Correct
What is your variable Branch expands to?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oh, I'm sorry. You are right, {'1','3'} is correct.
Well, my variable is simple just storing the number 1.
I've tried several forms to combine two values, but no success...
Print of my variable:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How do you intend to enter the two values? can you show us this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That is exactly what I wanna know!
How to enter two values in the variable to reflect on the set analysis.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May be enter like this
1, 3
and then use it like this
BPLId = {$(=Chr(39) & Replace(Branch, ',', Chr(39) & ',' & Chr(39)) & Chr(39))}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It worked like a charm! Thank you so much!
Just to see what is going on, this formula inserts single quotes with Chr(39) and replace the comma with comma and quotes, closing the end with another quote. Right?
If so, I'll be able to use as much values inside my variable as I may need.
Well, thanks again for all your support!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Comma is replaced with ','
So 1, 3 is becoming '1', '3'. Similarly, 1, 3, 5 will become '1', '3', '5'
