cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
drossi
Helper III
Helper III

Calculating VAT and Total amount from one input

Hello,

 

I have a SharePoint List and used that as my form for this page.

 

Most of it is View only apart from DataCard box 'SubTotal'.

 

What I want to happen is when user inputs a figure in 'SubTotal' box (for example €100), I want Datacard box 'VATAmount' to populate with the VAT Amount according to this calculation 'SubTotal' x 'VATRatetoApply'. I currently get an error, I think it is because 'VATRatetoApply' is a Choice within my SharePoint list. I've tried updating the 'VATRatetoApply' default to a .Value in my formula but does not work.

 

So in this case, I've already got the 'Total' to populate with 'SubTotal' + 'VAT Amount'.

 

So in an ideal world, I would input 100 in SubTotal box, then VAT Amount would populate with 13.50 and Total Box would populate with 113.50.

 

Screenshot 2021-03-25 at 20.29.47.png

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @drossi ,

 

Please try to use this formula on Default property of Vat Amount datacard.

DataCardValue22*DataCardValue32.Selected.Value

v-xiaochen-msft_0-1616742976008.png

 

If it still does not work correctly, please tell me what control DataCardValue32 is.

Is it a combo box control ? Or a textinput control?

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

View solution in original post

4 REPLIES 4
v-xiaochen-msft
Community Support
Community Support

Hi @drossi ,

 

Could you tell me:

  1. What is your final calculation goal? ( Total = Sub Total+ Vat Amount  Or Total = Sub Total + Sub Total *  VatRateToApply)
  2. What is your formula? What is its error message? 
  3. What are the data types of the 4 columns?
  4. What are the controls used in 4 datacards? 

 

Best Regards,
Wearsky

Hello, @v-xiaochen-msft 

 

1. It would be 'Total = Sub Total+ Vat Amount'

2. Error: Invalid Argument Type. Expecting one of the following: Number, Text, Boolean.

3. SubTotal, VatAmount and Total are currency. Vat Type is a Choice that lets user select either 0.00 or 13.5

4. Not sure in the ask here, sorry.

 

Screenshot 2021-03-26 at 06.34.23.pngScreenshot 2021-03-26 at 06.33.54.pngScreenshot 2021-03-26 at 06.33.47.pngScreenshot 2021-03-26 at 06.33.30.png

v-xiaochen-msft
Community Support
Community Support

Hi @drossi ,

 

Please try to use this formula on Default property of Vat Amount datacard.

DataCardValue22*DataCardValue32.Selected.Value

v-xiaochen-msft_0-1616742976008.png

 

If it still does not work correctly, please tell me what control DataCardValue32 is.

Is it a combo box control ? Or a textinput control?

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

View solution in original post

drossi
Helper III
Helper III

Ah thanks so much. That worked a treat!

 

 

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,013)