Forum Discussion

Evilgid's avatar
Evilgid
Copper Contributor
Aug 12, 2022

Formula does not work for SharePoint/Lists

I recently started to work with list. 

My list contains product information such as Vitamins.

 

I want to have one Column "Total Vitamins" in which the the vitamins are calculated together.

(Vitamin C + Vitamin D) simple.

 

Here did I find the formulas Support - Office.com

For sum it is =[Spalte1]+[Spalte2]+[Spalte3] (german formulas)

But it does not work. It creates a fault.

 

"The default value formula cannot refer to columns. To define a column that is based on other columns, use a calculated column." --> which is exactly what i was trying!

 

Original german: "Die Standardwertformel kann sich nicht auf Spalten beziehen. Um eine Spalte zu definieren, die auf anderen Spalten basiert, verwenden sie eine berechnete Spalte."

 

Optional it should work with

=summe([Spalte1];[Spalte2])

This creates a Syntax fault.

 

Anyone any idea how to make it work to summ up values from different columns in 1 coloum for every row!

 

Thank you in advance

  • Evilgid Are these ([Spalte1], [Spalte2], [Spalte3]) all "Number" columns? You should use Number columns here.

    Follow these steps:

    1. Go to SharePoint list
    2. Click on "Add column" and select "More..." 
    3. On "Create Column" page, select "Calculated" as data type: 
    4. Enter you formula here, select "Number" as return type and click "OK" at the bottom of page: 

    Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

  • Evilgid Are these ([Spalte1], [Spalte2], [Spalte3]) all "Number" columns? You should use Number columns here.

    Follow these steps:

    1. Go to SharePoint list
    2. Click on "Add column" and select "More..." 
    3. On "Create Column" page, select "Calculated" as data type: 
    4. Enter you formula here, select "Number" as return type and click "OK" at the bottom of page: 

    Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

    • cat23's avatar
      cat23
      Copper Contributor

      This does not work in the Microsoft Lists Web App.  There is no "More" option and therefore no "Calculated" option.  Same error generates.

       

      • TBCanopy's avatar
        TBCanopy
        Copper Contributor

        You have to click on "See all column types" at the bottom of the menu when you create a new column. It takes you to a whole new web page which is kind of annoying but once you fill out the column specifics and save it takes you back to your list...

         

    • Evilgid's avatar
      Evilgid
      Copper Contributor

      ganeshsanap thank you for your answer. It works this way.

      To answer your questions. All fields were numbers. I try to use Formulars in existing colums but that does not work and still does not.

       

      But it works when creating a new one. 

       

      Thank you very much. 

      • Evilgid You cannot use "calculated value" option of existing columns as this option cannot reference other columns in list in formula.

        So, you have to create a column with "calculated" data type for referencing other columns in list in calculated formula.


        Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

Resources