Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to apply filter selection for only 2 columns on set analysis if you have 50 columns

Hi

I have columns names like Country,Area,Region,State,City,Zipcode,geocode,Areacode,lob,client,productname,subproductname.

Now I am showing expression as Sum(sales). Now i want restrict selection on this expression only applicable for  Country,lob.


Then i can write set analysis as Sum({<Area=,Region=,State=,City=,Zipcode=,Areacode=,client=,productname=,subproductname=>}sales)


If i have 50 columns and i want effect only 2 column selections on Sum(sales),i can write above expression but it is very difficult add 48 columns in set analysis.If you guys finds any other simple way to put in set analysis please send me the expression.

Thanks,

Raj


6 Replies
Clever_Anjos
Employee
Employee

Try with this, where Col1 and Col2 are the fields that you want to be restricted

Sum({1<Col1=P(Col1),Col2=P(Col2)>}sales)

Anonymous
Not applicable
Author

Thanks for your replay.No it didn't work..i needed set analysis expression for out of 50 columns i want selections need to be applicable for only 2 columns.

Clever_Anjos
Employee
Employee

that 1 after brackets means "Discard all selections" and then we´re applying the only columns that matter using the P() operator

Anonymous
Not applicable
Author

But it's not working

jonathandienst
Partner - Champion III
Partner - Champion III

P() gives possible values which may be affected by other selections. This is a better way to respect the selections for Country, Iob:

=Sum({1<Country = $::Country, Iob = $::Iob>} sales)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein