none
SharePoint 2010: Getting the sum of a column from one list copied/updated to a field in another list RRS feed

  • Question

  • Hi,

    I have two list. List A has the numbers that are then summed up. List B: I want it to take the sum from List A and display it in real time. So that when List A is updated (and the sum is changed) List B's value also changes.

    For Example:

    List A:

    Country                                   Costs (Sum = 800)

    Germany                                 100

    Canada                                   300

    United Kingdom                       400

    List B:

    Measures                              Totals

    Country                                  800

    Any help is appreciated! But please try to have your answer have no coding. Designer is fine - no coding though. Thanx

    Friday, December 20, 2013 8:02 PM

Answers

  • Hi,

    According to your post, my understanding is that you wanted to get the sum of a column from one list and used it in another list's column calculation.

    You can use workflow to achive what you want.

    Please follow the steps as below:

    1. Create a custom list named List A, add columns: Country(Single line of text), Costs(Number)
    2. Create a custom list named List B, add columns: Measures (Single line of text), Totals (Number).
    3. Add item to List B: Measures: Country; Totals: 0
    4. Create a workflow associated to List A.
    5. Start the workflow automatically when an item is changed and changed.
    6. Add actions:

    Then when you add or edit the item in List A, the workflow will be started automatically. And then the Totals in the List B will be updated.

    Thank you for your understanding.

    Best Regards,

    Linda Li


    Linda Li
    TechNet Community Support



    • Edited by Lindali Monday, December 23, 2013 7:51 AM
    • Proposed as answer by Hemendra AgrawalModerator Tuesday, December 24, 2013 10:38 AM
    • Marked as answer by JasonGuo Sunday, December 29, 2013 3:48 PM
    Monday, December 23, 2013 7:49 AM

All replies

  • Hi,

    According to your post, my understanding is that you wanted to get the sum of a column from one list and used it in another list's column calculation.

    You can use workflow to achive what you want.

    Please follow the steps as below:

    1. Create a custom list named List A, add columns: Country(Single line of text), Costs(Number)
    2. Create a custom list named List B, add columns: Measures (Single line of text), Totals (Number).
    3. Add item to List B: Measures: Country; Totals: 0
    4. Create a workflow associated to List A.
    5. Start the workflow automatically when an item is changed and changed.
    6. Add actions:

    Then when you add or edit the item in List A, the workflow will be started automatically. And then the Totals in the List B will be updated.

    Thank you for your understanding.

    Best Regards,

    Linda Li


    Linda Li
    TechNet Community Support



    • Edited by Lindali Monday, December 23, 2013 7:51 AM
    • Proposed as answer by Hemendra AgrawalModerator Tuesday, December 24, 2013 10:38 AM
    • Marked as answer by JasonGuo Sunday, December 29, 2013 3:48 PM
    Monday, December 23, 2013 7:49 AM
  • Thanks for this solution, Lindali. Unfortunately, it works fine to update a total on list B when a new item gets added to list A, but it does not update the total in list B when a list A item value gets changed or an item is deleted from list A.

    Do you have any further suggestions to get around the limitation of your current solution?

    Many thanks

    Wednesday, October 21, 2015 3:26 PM
  • For updating the listB when an list A item updates, attach a new workflow to listA with just "Update Item in list B" action and set the start workflow option to start only when item changed. That takes care of the situation when list A updates, list B update too.

    Not sure for delete situation. Sorry

    Wednesday, October 21, 2015 3:43 PM