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

Variables in Set Analysis

Hi,

I am trying to use variables in set analysis.

Data:

Location *
DS_V1FIN_P
DS_ENGINE_P
DROP_CAC
DROP_SHIP
DS_V1FINISH
2D3506163
1D6506911
DS_ENGINE

 

Variable Defined:

vLoc= if(wildmatch([Location *],'2*','1*','B*','DS*') and Right([Location *],2)<>'WP' and Right([Location *],2)<>'_P',[Location *])

Text Object Expression:

=Count({<[Location *]={'$=($(vLoc))'}>}[Location *])

This expression does not work. 

Can some one please explain the syntax for variables in set expression? How to fix the expression above?

Please find attached qvw file.

Thanks,

Vidya

1 Solution

Accepted Solutions
sunny_talwar

Try this

 

=Count({<[Location *] = {"=WildMatch([Location *], '2*', '1*', 'B*', 'DS*') and Right([Location *], 2) <> 'WP' and Right([Location *], 2) <> '_P'"}>}[Location *])

 

View solution in original post

5 Replies
sunny_talwar

Try this

 

=Count({<[Location *] = {"=WildMatch([Location *], '2*', '1*', 'B*', 'DS*') and Right([Location *], 2) <> 'WP' and Right([Location *], 2) <> '_P'"}>}[Location *])

 

poluvidyasagar
Creator II
Creator II
Author

Hi Sunny,

It works perfect. But why does it not work using variable in side set expression.

Thanks,
Vidya
sunny_talwar

Because I don't think what you were using in set analysis was the right way to do it....

poluvidyasagar
Creator II
Creator II
Author

What is the right syntax for using variables in set expression?
sunny_talwar

It depends on various different things... there is no one holy grail I can provide you... but in general you can start here The Magic of Variables