cancel
Showing results for
Did you mean:

## Calculate the sub-total Amount based on different Currencies

In "Expenses Claim Form", there is a filling section allowing claimant to fill-up their receipts information (1 receipt per 1 row/ record).  For each filling record, A drop-down list from a Table (or List) called "Currency" and a Textbox for inputting the exact Amount.  May I know if I could:

(a) Calculate the sub-total based on different Currencies selected from drop-down & Patch it to the table (List) called "Claim Line Items"

(b) Calculate the converted total amount in single dollar sign (e.g., USD) and Patch it to the table (List) called "Claim"

(c) Display the sub-total Amount based on different currencies (e.g., USD\$100 & EUR\$100.50 & AUD\$300 and so on if any) in a non-editable text label format

I would much appreciate if anyone could give me your valuable advice.  Much obliged.

***************************************************************************************

"Currency" Table (3 columns):

ID // Description // Rates

USD // US dollar // 1.0

EUR // Europe dollar // 2.37

AUD // Australia dollar // 3.87

.....

7 REPLIES 7
Super User

Hi @happyccy ,

Firstly I think I could buy a green back for less than \$3.87 of our \$ (you must have us confused with Argentina) however to your issue . . . .

Assuming you have a combo box with the Currency table as the source and Rates is a numeric column (it will display one/both of the first two columns).

I also assume you have selected the item from a gallery and have the amount to be converted in a text box called txtClaim. You also did not include the name of the field to be Patched in (a) - I have used ClaimAmount.

So on your button for (a) and (b)

``````With(
{
wRate:ComboBoxName.Selected.Rates,
wClaim:Value(txtClaim,Text}
},
Patch(
'Claim Line Items',
{ID:GalleryName.Selected.ID},
{
ClaimAmount:wRate*wClaim
Claim:"\$ " & Text(wRate*wClaim,"##,##0.00")
}
)
)``````

For your Label (c) , simply display in the Text (make sure it is inside the Form)

``ThisItem.Claim``

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Super User

Hi @happyccy ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Anonymous
Not applicable

Hi @happyccy

Did you solve this, as I am in the need of the same?

Yes, WarrenBelz's way is also a sample teaching demo for me.

However, to adapt my existing UI, I design the calculation textbox is non-editing and set the formula just by Currency x Input amount.

Anonymous
Not applicable

@happyccy I have implemented Reza's solution - I saw you asked him.

So which list did you make the currency in and how have you set the currency up? 🙂

Yes, I solved it finally, based on different experts' reference materials.

I created the "Currency" table on SharePoint by myself, but not refer to website's rates.  In other words, I need to update the rates every month.

In this "Currency" table, there are 3 columns.

CurCode // Description // Rates

EUR // Europe dollar // 1.00

AUD // Australia dollar // 15.00

USD // United States dollar // 20.00

In combo box, I can disable "Allow Multi Select", and display the description and code for user selection.

When selected, route the rates x textbox = result

Anonymous
Not applicable

So you create the columns and then after add in the data?

I am trying to get the Rate to find the number conntected to the TypeCurrency - However I cannot seem to get it to work.

Announcements

#### Microsoft Power Up program unveils new curriculum and more

New engaging and cohesive Power Up curriculum The Microsoft Power Up Program – a self-paced upskilling program, launched in 2022 to help non-technical professionals gain marketable skills using the Microsoft Power Platform – takes learning to the next level with a cohesive video-based curriculum that spans only seven weeks. Recognizing the demand for multimedia content, we partnered with Microsoft MVPs Rory Neary and Charlie Phipps to create engaging videos that not only simplify complex concepts, but also make the learner experience more dynamic and immersive. Each course follows the same business through real-world scenarios with demos and hands-on exercises for learners to gain skills and build solutions using Power Apps, Power Automate and Power BI. This structured approach not only enhances comprehension but also equips learners with tangible skills that can be applied immediately in their professional endeavors. By focusing on key areas, the program has been shortened from 12 weeks to seven, saving valuable time without sacrificing quality. Special thanks go to Microsoft Power Platform advocates, April Dunnam and Renee Noble who shared their expertise and to Power Up Program champs who contributed with feedback and reviews over the last 1+ year to make this significant improvement.   Easy access to a comprehensive Development Environment In addition, the program now offers simplified and instant access to a comprehensive development environment for Power Up Program learners to explore and experiment with the Power Platform in a sandbox environment, fostering creativity and innovation.     Introducing App-In-A-Day (AIAD) workshops for Power Up learners As an added incentive, participants of the Microsoft Power Up Program can now sign up for partner-led “App in a Day” virtual workshops. These workshops, conducted by industry experts and Microsoft partners, provide invaluable insights and practical guidance to supplement the core curriculum. By attending these workshops, learners can gain deeper insights into application development and further enhance their skills in leveraging the Power Platform for business solutions. A big shout to our partners that are supporting the Power Up Program and delivering these AIAD workshops: Advaiya, Almato AG, Braintree, Kaispe, Koenig Solutions, PowerApps 911, Pragmatic Works, Smart Consulting.   These enhancements introduced to the Microsoft Power Up Program mark a significant milestone in the ongoing quest to empower individuals with the skills needed to thrive in today’s digital economy. By embracing video-based learning, streamlining the curriculum, and offering personalized experiences, the program continues to set new standards of excellence in virtual education. Sign up today to start your Power Up learning journey (https://aka.ms/PowerUp/)   by Dimpi Gandhi, Principal PM Lead, Power Up ProgramRepost from Microsoft Power Platform Product Blog

#### Announcing Power Apps Copilot Cookbook Gallery

We are excited to share that the all-new Copilot Cookbook Gallery for Power Apps is now available in the Power Apps Community, full of tips and tricks on how to best use Microsoft Copilot as you develop and create in Power Apps. The new Copilot Cookbook is your go-to resource when you need inspiration--or when you're stuck--and aren't sure how to best partner with Copilot while creating apps.   Whether you're looking for the best prompts or just want to know about responsible AI use, visit Copilot Cookbook for regular updates you can rely on--while also serving up some of your greatest tips and tricks for the Community. Our team will be reviewing posts using the new "Copilot" label to ensure we highlight and amplify the most relevant and recent content, so you're assured of high-quality content every time you visit. If you share a post that gets featured in the curated gallery, you'll get a PM in the Community to let you know!The curated gallery is ready for you to experience now, so visit the new Copilot Cookbook for Power Apps today: Copilot Cookbook - Power Platform Community. We can't wait to see what you "cook" up!