Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
Answered

Filter Roll Up Field

(0) ShareShare
ReportReport
Posted on 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 at
    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 at
    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 at
    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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Microsoft Dataverse

#1
mmbr1606 Profile Picture

mmbr1606 22 Super User 2025 Season 1

#2
stampcoin Profile Picture

stampcoin 17

#3
ankit_singhal Profile Picture

ankit_singhal 11 Super User 2025 Season 1

Overall leaderboard

Featured topics