Hi guys, I need some help with the syntax to create a calculated column in SharePoint.

Anonymous
2022-03-03T09:48:55.123+00:00

Hi guys, I need some help with the syntax to create a calculated column in SharePoint.
Considering columns A and B, I need to calculate B column with the following logic:
where A contains
0
1
2
3
4
5
6
7
8
9

and B contains
1%
10%
35%
50%
60%
80%
90%
100%
5%
0% respectively

I have used column A as choice (menu to choose from) option in sharepoint, and want to calculate the value of column B automatically from column A in excel report using query.

Let say, if i select 0 from column A and hit save then the output in excel should reflect as 1%.

Thanks in advance

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,244 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,793 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,701 questions
0 comments No comments
{count} votes

Accepted answer
  1. Echo Du_MSFT 17,116 Reputation points
    2022-03-04T02:16:48.013+00:00

    Hello @sumiteshkumar-6515 ,

    Welcome to Q&A Forum!

    Please follow the steps:

    1.Create a Choice column named [A]

    179848-1.jpg

    2.Create a Calculated column named [B]

    179921-2.jpg

    3.Use the below Formula:

    =IF([A]="0","1%",IF([A]="1","10%",IF([A]="2","35%",IF([A]="3","50%",IF([A]="4","60%",IF([A]="5","80%",IF([A]="6","90%",IF([A]="7","100%",IF([A]="8","5%",IF([A]="9","0%",""))))))))))  
    

    4.Here is my test:

    179875-test.gif

    Thanks,
    Echo Du

    =================================

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful