1

I have a Roll-Up Summary (SUM Opportunity Product) field. The field gives an option to Only records meeting certain criteria should be included in the calculation which is really good because it allows me to filter but the filter criteria only has AND option but not an OR. Why is that? And how can I workaround it? Please assist.

4
  • "Why is that?" Because they didn't want to make the engine overly complicated.
    – sfdcfox
    May 7, 2018 at 19:51
  • 2
    why not just put a formula field on the detail that includes the OR logic and then your filter just is myFormula__c = true
    – cropredy
    May 8, 2018 at 0:56
  • @cropredy Rollup fields do not show formula fields.
    – apz
    Dec 17, 2021 at 16:31
  • @apz They do show up BUT they cannot be cross object formulas Apr 13 at 9:25

2 Answers 2

1

There's a couple of ways to work around this limitation.

One option, using native functionality, is to decompose your OR Roll-Up Summary into more than one Roll-Up Summary, each of which has only a single criterion, and then using a separate formula field to sum those component Roll-Up Summaries. The downside to this approach, of course, is that you consume more of your scarce limit for Roll-Up Summaries.

Another option would be to use Declarative Lookup Rollup Summaries, which (belying its name) can also work on master-detail relationships and which supports the full breadth of SOQL in defining the set of records to be included in the rollup.

2
  • 1
    DLRS is exactly what I recommend whenever you need something more complicated than the out-of-the-box feature, which is pretty common given its limitations.
    – sfdcfox
    May 7, 2018 at 19:50
  • 1
    Same here - unfortunately some orgs are extremely reluctant to install packages and/or are in Apex limit trouble.
    – David Reed
    May 7, 2018 at 19:56
0

there is posibilty to choose more than one option in a row in a value field, just pick two or more quadrats. enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.