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

Multiply Function in Powerapps

How to write multiply function in "Form" Datacard of Powerapps. I am having 3 Data Cards in a Form. Now when I multiply First(Price) and Second(Quantity) Data Card, the value must be displayed in Third(Total Amount) Data Card. In Data Card there is no "Text" option to write a formula also. So, Please help me with the multiply function.

2 REPLIES 2
CMee
Level: Powered On

Re: Multiply Function in Powerapps

You can set the Default property to the function you want for your total datacard:

 

DataCardValue3.Default = DataCardValue1.Text * DataCardValue2.Text
DataCardValue3.DisplayMode = DisplayMode.View

Setting the displaymode for your total datacard to view prevents users from overriding the default calculated value with another one accidentally.

Highlighted
Community Support Team
Community Support Team

Re: Multiply Function in Powerapps

It would depend on the actual data and the corresponding control binded with that field.

 

Please first take a look at the following article to understand how the form and the DataCard works together.

Understand form in PowerApps

Understand data cards

 

DataCard is the building blocks within a form control, and within the DataCard, there should be at least two control to work with the actual data field, first is the Label to identify which data field (column name), and then another for the actual value, which mostly is named as DataCardValue.

 

To have the calculation work, we need to work with the Value control.

Once you figure out the logic there, then we just need to work with the Value control to configure the calculation:

TotalAmountValue control, default property:

Formula should be:

PriceValuecontrol.Text * QuantityValuecontrol.text

Or, to work with the data source directly, the formula could be changed as:

ThisItem.Price*ThisItem.Quantity

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.