Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
LReeve
Contributor III
Contributor III

Set Expressions >*< vs , separation

Hi Guys,

Had a search but can't seem to find a definitive answer. I have a simple Set Expression where I am trying to get:

  • Sum of Sales
  • Greater than my variable
  • Of Type 1

Can anyone confirm why the below set expressions gives different results so I can ensure I always use the correct format going forwards.

Sum({<Field1 = {">$(vMyVariable)"}>*<Field2 = {"2"}>} Sales)

and

Sum({<Field1 = {">$(vMyVariable)"}, Field2 = {"2"}>} Sales)


I've always been lead to believe they are the same?


Thanks in Advance!

Labels (1)
1 Solution

Accepted Solutions
petter
Partner - Champion III
Partner - Champion III

However if you change the first expression into this:

     Sum({<Field1={">$(vMyVariable)"},Field2=>*<Field1=,Field2 = {"2"}>} Sales)


It should be equivalent to:


     Sum({<Field1 = {">$(vMyVariable)"}, Field2 = {"2"}>} Sales)


The second expression should be quite a bit more performant I would believe...


View solution in original post

4 Replies
petter
Partner - Champion III
Partner - Champion III

Well if you have user-selections on either of the two fields the expressions will not necessarily give the same results. If you don't have any selections on the fields then they will give the same. Think about it...

petter
Partner - Champion III
Partner - Champion III

However if you change the first expression into this:

     Sum({<Field1={">$(vMyVariable)"},Field2=>*<Field1=,Field2 = {"2"}>} Sales)


It should be equivalent to:


     Sum({<Field1 = {">$(vMyVariable)"}, Field2 = {"2"}>} Sales)


The second expression should be quite a bit more performant I would believe...


LReeve
Contributor III
Contributor III
Author

Thanks Peter!

Very useful and logical explanation.

petter
Partner - Champion III
Partner - Champion III

You're welcome