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

Community site session details

Session Id :
Power Apps
Unanswered

Calculated output

(0) ShareShare
ReportReport
Posted on by 12
Hi

We have a Power App that allows a sales team to choose products using various DataCardValue number input fields.
 
We have a Sharepoint list with the correct costs for each product chosen. When a PowerApp is submitted, Sharepoint calculates the Total cost using predefined list fields with price values.
 
Sharepoint works 100%
 
Our sales manager would like to see a cost summary on the power app before submitting it.
 
I have tried LookUp(SP_Name,' column'  * DataCardValue but am failing with errors.
 
What would be the correct syntax to Lookup a Sharepoint list column, get the default value and multiply it by the PowerApp DataCardValue.Text
 
I appreciate any help you can provide.
Categories:
I have the same question (0)
  • Suggested answer
    Mark Nanneman Profile Picture
    991 Super User 2025 Season 2 on at
    Calculated output
    Add some kind of gallery or drop down where you select the SharePoint item that has the price.

    For example, here I have a dropdown that displays the SharePoint items in a "Products" list that has a "Price" column.  I also have a text input field to select the quantity.




    The simplest formula to get the total cost is 

    drp_products.Selected.Price* Value(txt_quantity.Value)
    You could also do a lookup if you had to, but if the record is already loaded somewhere just reference that.
    LookUp(SP_Name, SP_ID_Column = Selected_SP_Item_ID).Price_Column  *  Quantity_value

    Here I have some more complex code to give the user the info about what product, quantity and final cost of their selection looks like:





    You can also use a "Shopping Cart" type system by patching the user's select product and quantity  to a collection


    Then, you can build yourself a "Shopping Cart" gallery that shows this "col_shopping_cart" collection and displays the selected products+quantities+total costs.  Then you can add some controls to run Sum() function on the gallery or collection and the "totalCost" property to show the final total cost.




    If this helped you, please click "Does this answer your question" and give it a like to help others in the community (+ close the ticket)!

    Power Platform Developer | LinkedIn: Mark Nanneman | Blog: Power Stuff  | YouTube: Mark's Power Stuff  | Buy me a coffee

    ​​​​​​​
  • Suggested answer
    ronaldwalcott Profile Picture
    3,847 Super User 2025 Season 2 on at
    Calculated output
    If product is a dropdown selection you would probably have something more like
     
    LookUp(SP_Name, productColumn = dropdown.Selected.Value, productprice) * Value(datacard.Text)
  • MATO_Simon Profile Picture
    12 on at
    Calculated output
    Thank you for the very good in depth details.
     
    We have the following
     
     
    SP list contains all the pricing and we would prefer not to load to the PA
     
     
    We have tried the following and can see we are getting an error with how we are displaying the Default Value Number
     
    LookUp(Tools,'204-900' =.Number) * DataCardValue_204_900.Text
     
     
  • Suggested answer
    Mark Nanneman Profile Picture
    991 Super User 2025 Season 2 on at
    Calculated output
    There are multiple things wrong here.

    A.  Your lookup function is not formatted correctly.  LookUp is like a search/filter function, inside the parenthesis, after the comma and the datasource, you have to give it a search/filter formula that tells it how to find the record you want--the simplest formula would be "LookUp(<my_Data_Source>, <data_source_ID_column>= <ID value>)

    B.  Your formula is trying to multiply a whole record against a text, which fails for mulitiple reasons, the first being you cannot multiply a record object by anything.
     
    LookUp(<data>,<formula>) returns a record object.  assuming ".Number" is a Number column on the record that you want to use for your math, you would write it like this:

    LookUp(<data>,<formula>).Number

    In any case, to do math with a LookUp() function you need to put a .<some_number_property> after the last ")".  
     
    C. Your formula is trying to multiply against a .Text property.  .Text is a string, and cannot be used in math functions.  Convert it to a number by using "Value(<text_control_name>.Text)"

     


    If this helped you, please click "Does this answer your question" and give it a like to help others in the community (+ close the ticket)!

    Power Platform Developer | LinkedIn: Mark Nanneman | Blog: Power Stuff  | YouTube: Mark's Power Stuff  

     
  • MATO_Simon Profile Picture
    12 on at
    Calculated output
    Sorry Mark
     
    My brain is fried - I understand what you are saying but I can't get it working in my head or PA :(
     
    What would I actually input to get this working?
     
    Thank you for your help on this.
     
    I have to admit its easier to pull the 204-900 data price into the PA and just turn off visible.
     
    Then use DataCardValue_204_900.Text * DataCardValue_204_900_Price.Text
     
    As it works every time, Am I making this too complicated?
  • Mark Nanneman Profile Picture
    991 Super User 2025 Season 2 on at
    Calculated output
    Sorry if I was too blunt.  I know how it is when you fry the brain!😆


    Can you post a screenshot of your formula in powerapps and the error it's causing/showing?
  • MATO_Simon Profile Picture
    12 on at
    Calculated output
    Hi Mark
     
    We pulled all prices into the app
     
    Made life a lot easier, Sometimes I get very frustrated with Power Apps
     
    Thank you for your help.
     
    Si
  • MATO_Simon Profile Picture
    12 on at
    Calculated output
    Now I just need to work out how to Close the ticket :(
     
    "Does this answer your question"  Ticked the Box and it  doesn't do anything :(
     
    (+ close the ticket) Whats going on Microsoft?
     
    Argghhhhh

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 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard