cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
InnerCityMatt
Regular Visitor

Calculation Field in Model Driven App not working

I have two fields that are set to perform calculation but nether field is doing the calculation.  See below.  I don't see option that I need to select to make the calculation automatic.

 

 

 

InnerCityMatt_0-1618532475328.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @InnerCityMatt,

 

Yes, all the fields used in the calculation must have a value for the calculation to work. You may want to add some additional conditions to account for the cases where some of the fields don't have data.

 

---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

View solution in original post

6 REPLIES 6
ChrisPiasecki
Super User
Super User

Hi @InnerCityMatt,

 

Calculated fields are computed when retrieving a record (e.g form load or shown on a view), and will not automatically update in the user interface when immediately changing a field value. You'd have to save the record and cause a refresh in order to see calculated field update as the record will be retrieved again.

 

---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

I have been doing that.  I imported a large data set to the table with values in the fields that are used in the calculation.  I have click refresh and opened up records in the form but still, no calculations are being performed.  I am still working in the solution.  

Hi @InnerCityMatt,

 

Have you published customizations? Also, are those fields used in the calculations just simple decimal types/whole numbers, or are you referencing any other calculated fields?

 

---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

dpoggemann
Resident Rockstar
Resident Rockstar

Hi @InnerCityMatt,

 

A few things to check:

1.  Set the calculation to a simple value to verify the calculation is firing.  Example, set to a single value or something like that, this will help to verify that the calculation is actually taking place on the field.

2.  If this works add additional calculations step by step until it fails to see what is causing the issue.

3.  Verify your output format is acceptable based on the calculation (i.e. if calculation causes a decimal value that it is decimal)

4.  Verify the calculation is not pushing the value past a maximum or below a minimum defined for the field

 

Hopefully these steps help.  Please mark accepted if answers and Like if it justs helps.

 

Thanks!

Drew

The calculation is Set CICIncome(Currency) to (Premium(Currency) * CICCommisionrate(Decimal))  + CICFee(Currency)

 

 

Here is what the form looks like.  Does every field in the calculation have to have a value of at least 0 before the calculation can be performed?

 

InnerCityMatt_0-1618536366460.png

 

I have clicked published on the form

Hi @InnerCityMatt,

 

Yes, all the fields used in the calculation must have a value for the calculation to work. You may want to add some additional conditions to account for the cases where some of the fields don't have data.

 

---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,074)