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 / How to Update Calculat...
Power Apps
Answered

How to Update Calculated Column value to another field

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have field A and field B calculation is field A* Field B and update value to Field C how to do this in powerapps.

My calculation is correct but the value not update into excel in OneDrive.

Categories:
  • v-yamao-msft Profile Picture
    Microsoft Employee on at

    Hi KasunPathirana,

     

    I have an Excel file saved in OneDrive and it has been formatted as a table. I have three columns in the table: Number1, Number2, Total.

     

    In the App, I connect to data to the Excel file. Then add two Text Input controls and a Text Box control, and a button on a screen.
    >About the Text Box, I set its Text property to:

     TextInput1.Text*TextInput2.Text


    >About the Button, I set its Onselect property to:

     Patch(Table2,Defaults(Table2),{Number1:TextInput1.Text,Number2:TextInput2.Text,Total:TextBox1.Text})

     

    When I click the button, all the data would be written to the Excel file saved in OneDrive. Please try if this works for you.

     

    Best regards,
    Mabel Mao

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks for the reply MabelMao I do not use a button to update I want two text fields and behind the scene update the 3rd field with result and to update OneDrive excel file relevant field too. How should i do it.

  • Perumal Profile Picture
    604 on at

    You can just move the Patch() function mentioned by @v-yamao-msft to the text property of TextBox3 and try as below.

     

    For the 3rd text box use the formula:

     

    Value(TextInput1.Text)*Value(TextInput2.Text); Patch(Table2,Defaults(Table2),{Number1:TextInput1.Text,Number2:TextInput2.Text,Total:Value(TextInput1.Text)*Value(TextInput2.Text)})

  • hpkeong Profile Picture
    2,944 on at

    Hi

     

    In fact, what MabelMeo sugeested was a normal and straightforwad practice.

    If you wish, you may have:

    On.Hidden = If(TextInput1*TextInput1_1.Text > 0, Patch(Table1, Defaults(Table1), {Qty: TextBox1.Text}))

    (That means, when you navigate away from the screen, this behavior formula will fire, to replace BUTTON.OnSelect).

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Value2.jpg

    Currency Amount - I have use DataCardValue18

    Exchange Rate - I have use DataCardValue21

    Amount (SGD)  under Text Property I tried to use above function but was not successful only how do i incorporate and update table 2 is the source and update to the Amount (SGD) column. 

     

     

  • Verified answer
    murali Profile Picture
    Microsoft Employee on at

    You could do one of the following:

    1. Set Amount.Default = DataCardValue18 * DataCardValue21. This however assumes that Amount.DataField is bound to a field in the datasource. You can do that by setting DataField of Amount card to Total

    2. Patch(DS, Defaults(Table2), {...Total: DataCardValue18 * DataCardValue21}).

     

    Hope this helps.

     

    Murali

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks all for helping Smiley Wink

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 350 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 318

#3
Mohsin Ali Profile Picture

Mohsin Ali 220

Last 30 days Overall leaderboard