cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Super User
Super User

Question regarding re-use of formulea and peformance

If I have a formula suchs as:

 

Sum(Filter('[Order].[OrderDetail]', OrderHeaderID =galOrderHeader.Selected.OrderHeaderID),OrderDetailLineTotal )

which I have already assigned to a label and want to reference elsewhere in my app, is there any performance difference between referencing the label and including the full formula again?

 

For example, the formula above is for lblOrderTotalCalc and calculates the OrderDetailLineTotal for a given OrderHeader. I now want to display the total discount according to a selected OrderDiscountID. By using a reference to lblOrderTotalCalc (rather than inserting the full formula) as shown below am I saving a query to the datasource?

RoundDown(LookUp(LocalOrderDiscount, OrderDiscountID = DataCardValueOrderDiscountID*1, OrderDiscountPercent)*lblOrderTotalCalc/100,0)

Cheers

Paul

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support Team
Community Support Team

Re: Question regarding re-use of formulea and peformance

Hi @PaulD1,

 

Sorry but there is no way to do that in PowerApps so far. You will need to insert the full formula again. The second formula won't work as you wish. Though I think this is a good idea if the formula could be reuse. Consider to post this idea in the PowerApps Ideas forum, so it might be considered for future releases.

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

Regards,

Mona Li

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

View solution in original post

1 REPLY 1
Highlighted
Community Support Team
Community Support Team

Re: Question regarding re-use of formulea and peformance

Hi @PaulD1,

 

Sorry but there is no way to do that in PowerApps so far. You will need to insert the full formula again. The second formula won't work as you wish. Though I think this is a good idea if the formula could be reuse. Consider to post this idea in the PowerApps Ideas forum, so it might be considered for future releases.

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

Regards,

Mona Li

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

View solution in original post

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (4,375)