web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : YNJgcHMLyY8AvBQIvFYqHl
Power Apps - Microsoft Dataverse
Answered

Filter Roll Up Field

Like (0) ShareShare
ReportReport
Posted on 27 May 2020 15:33:34 by 144

I'm working on a roll up field, and I'm struggling to get the filter to fit my use case.  It keeps forcing the two arguments below the If statement to share the same AND/OR value.  I need the following filter:

If Status <> Lost, and the Actual OR Estimated Rev >= 5000

Any ideas how to group the two arguments below the IF?

Screen Shot 2020-05-27 at 11.22.29 AM.png

Categories:
  • Connor551 Profile Picture
    144 on 28 May 2020 at 13:25:30
    Re: Filter Roll Up Field

    @jlindstrom thanks for the reply!  

    I think we're going to end up doing something like this.  Right now, we're using some Dynamics connectors to avoid the Regarding() function (I think it's non-delegatable).  These connectors are being deprecated in October, so I was trying to find a way to get some of the app logic done within CDS.  

    Thanks for the input 🙂

  • Verified answer
    Joel CustomerEffective Profile Picture
    3,224 on 28 May 2020 at 04:10:18
    Re: Filter Roll Up Field

    Actual revenue will only include a value when the opportunity is won. I would look to simplify this--for example, create a realtime workflow that writes the actual value to estimated when opportunity is won. Then you just need to filter off of the estimated revenue and the status. workflow can update closed opportunity fields.

     

    Also, another way to do this is to schedule a power automate flow. If you ran the flow for all accounts that have opportunities one time, you could just run it for accounts that have opportunties where modified on is in past 24 hours and run it once a day. That way it would only  have to update accounts where the related opportunities have changed.

  • v-xida-msft Profile Picture
    on 28 May 2020 at 03:27:28
    Re: Filter Roll Up Field

    Hi @Connor551 ,

    Do you want to put the Actual OR Estimated Rev >= 5000 condition into a group rather than combined using "and"?

     

    Currently, within Roll-Up field functionality of CDS Entity, there is no way to add a Group operator in Roll-Up field functionality to group multiple conditions.

     

    Within Roll-Up field functionality, you could only specify 'And' or 'Or' to combine multiple conditions rather than both. If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:

    https://powerusers.microsoft.com/t5/Power-Apps-Community/ct-p/PowerApps1

     

    As an alternative solution, you could consider do the Calculation within a canvas app, then when you submit the data back to your CDS Entity, the calculation result would also be saved. Please take a try with the following workaround:

    1. Add a normal Number type column (called "High Opps") in your CDS Entity (not make it as "Roll-Up" field).

    2. Generate a canvas app based on your CDS Entity

    3. Go to the Edit form screen, enable the "High Opps" field data card in your Edit form.

    4. Set the Update property of the "High Opps" field data card to following:

    If(
     StatusDataCardValue.Text <> "Lost" && ('Est.Revemue'_DataCardValue.Text >= 5000 || 'Actual Revenue'_DataCardValue.Text >= 5000),
     <Type your Aggregation function here>
    )

     

    In addition, you could also consider use Patch function to update the "High Opps" field, please set the OnSuccess property of the Edit form to following:

    Patch(
     'CDS Entity',
     EditForm1.LastSubmit,
     {
     'High Opps': If(
     Status <> "Lost" && ('Est.Revemue' >= 5000 || 'Actual Revenue' >= 5000),
     <Type your Aggregation function here>
     )
     }
    );
    Back()

    Note: If the Status column is a Option Set type column in your Entity, please modify above formula as below:

    Patch(
     'CDS Entity',
     EditForm1.LastSubmit,
     {
     'High Opps': If(
     Status <> Status.Lost && ('Est.Revemue' >= 5000 || 'Actual Revenue' >= 5000),
     <Type your Aggregation function here>
     )
     }
    );
    Back()

     

    Built-in functions supported in PowerApps, please check the following article:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/formula-reference

     

    Best regards,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Featured topics

Loading complete