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,