Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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:
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!
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...
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...
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...
Thanks Peter!
Very useful and logical explanation.
You're welcome