Automatically assigning a value based on another column value

Occasional Visitor

Hello All,


I was wondering if there is a process in Sharepoint maybe using power automate that will help me fill a column automatically depending on another column value. 


As an example I have 26 Departments listed as possible choices in column A

I want Column B to auto generate a DepartmentID based on the department selected in column A


So every time HR (one of the 26 departments)  is selected in column A it will generate a "1" in column B.

Every TIme Operations is selected in column A it will auto populate a "2" in column B.


And so on and so fourth, my apologies if there is a simple solution, I'm quite new to using SharePoint and power apps.

1 Reply

@NicosAcuna well you could do it with a Switch control in Power Automate as you would be just inside the 27 case limit, but it's more work than having a calculated column using multiple If expressions. So your department column would be a choice column then you'd add the following formula to your DeptID calculated column:


etc etc.





Los Gallardos
Microsoft Power Automate Community Super User