Share via


Calculated Column in O365 SharePoint Online with an example

Introduction

There is no difference in calculated column formula in SharePoint Online from earlier versions of SharePoint. Let us see an detailed example in this article.

Functional Requirement

I have a column called “Activities” that is a choice column and has the following options:

Bylaw Development – Working Papers
Compliance Monitoring – Permitted Activities

I need to have 2 calculated columns to get split the ‘Activities’ choice – one for Activity and one for Subactivity.  For ‘Activity’, I need to get everything to the left of the ” – ” and for ‘Subactivity”, I need to get everything to the right of the ” – “.

For example:  For Bylaw Development – Working Papers, the activity should be ‘Bylaw Development’ and the subactivity should be ‘Working Papers’.

Solution

Below are the steps to achieve the same,
Step 1 : Create two columns “Activity” and “Subactivity” as a Single line text
Step 2: Create column “Activities” as below,
https://social.technet.microsoft.com/Forums/getfile/892378
Step 3: Enter the items as below,
https://social.technet.microsoft.com/Forums/getfile/892380
Step 4: All item view should display as below,
https://social.technet.microsoft.com/Forums/getfile/892381

Hope this helps.