Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

Help Replicating Excel Forumlas into PowerApps form

Version:1.0 StartHTML:000000239 EndHTML:000003880 StartFragment:000002014 EndFragment:000003848 StartSelection:000002014 EndSelection:000003844 SourceURL:

Hi I have an excel sheet that contains various formulas to calculate values based around a set of user defined dates.


Im trying to create a PowerApps form that will populate an Sharepoint List with the values the user enters and the calculations it shows from what they entered.


User entered Dates are Date of Birth(DOB), JoinDate, LeaveDate2.

I have managed to already calculate Age at Joining(as an Age) and date will or was 41 (as a date) which populate labels on the form.


Im now  trying to calculate years of service < 41 and years of service >41 


In excel this is achieved using the following formula - through 4 formulas.


Calculation 1 - is 




Calculation 2  is 




The value from Calculation 1 is then passed to Service <41 using the follwing forumla




The value from calculation 2 is passed to service >41 using




For ease here is a shot of the worksheet in excel



Ive tried to replicate the Caluclation formula 1 - to a label control on the Powerapps form setting the text to the following format but it isnt working


Round(If((DateValue(Age41Text.Text)<DateValue(JoinDateText.Text), 0,If((DateValue(Age41Text.Text)<DateValue(LeaveDate2.Text),(DateValue(Age41Text.Text)-DateValue(JoinDateText.Text))/365.25,(DateValue(LeaveDate2.Text)-DateValue(JoinDateText.Text))/365.25)),2)


Any ideas how I can do this?




Level 8

Re: Help Replicating Excel Forumlas into PowerApps form

Excel formulas are not the same in PowerApps I think. The former focuses on calculations more. I do not think this could be achieved in PowerApps.

Helpful resources


Power Apps Super User Class of 2020

Check it out!


New Badges

Check it out!


Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020


Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (4,367)