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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter Roll Up Field
Power Apps
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

I have the same question (0)
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    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,

  • Verified answer
    Joel CustomerEffective Profile Picture
    3,224 on at

    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.

  • Connor551 Profile Picture
    144 on at

    @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 🙂

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 610

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard