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

Notifications

Announcements

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

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:
I have the same question (0)
  • v-yamao-msft Profile Picture
    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
    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
    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
    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
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard