cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

calculate the value of a lookup column

I have a list in SharePoint Online that has 4 Choice Columns comprised of 4 options each for the user to select.  I also have a Lookup column for each Choice Column that returns a numberical value based on their selection from another list on the same subsite.  I need a Calculated column that will total the 4 numerical values in my Lookup columns but Calculated columns do not support Lookups.

 

I have read that a workaround to this is to build a flow that copies the values from the Lookup column into a Numerical column and then use the Numerical columns as the source for the Calulated columns but I cannot get the flow figured out.  Any assistance with building a flow to do this (or an alternative solution) would be greatly appreciated.  

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: calculate the value of a lookup column

Hi @Anonymous,

 

Could you please share a bit more about your SharePoint list?

 

I have created a SharePoint list on my side and the data structure of it as below:24.JPG

Note: Choice1, Choice2, Choice3 and Choice4 are all Choice type column with 4 options. Lookup1, Lookup2, Lookup3 and Lookup4 are all Lookup type column. Number1, Number2, Number3 and Number4 are all Number type column. Calculated1 is a Calculated type column, the calculated expression of Calculated1 column as below:28.JPG

 

I have made a test on my side and please take a try with the following workaround:

  • Add a "When an item is created" trigger.
  • Add a "Update item" action, Number1 field set to following formula:

 

triggerBody()?['Lookup1']?['Value']

Number2 field set to following formula:

 

triggerBody()?['Lookup2']?['Value']

Number3 field set to following formula:

triggerBody()?['Lookup3']?['Value']

Number4 field set to following formula:

triggerBody()?['Lookup4']?['Value']

Image reference:25.JPG

The flow works successfully as below:26.JPG

 

27.JPG

 

 

Best regards,

Kris

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Community Support Team
Community Support Team

Re: calculate the value of a lookup column

Hi @Anonymous,

 

Could you please share a bit more about your SharePoint list?

 

I have created a SharePoint list on my side and the data structure of it as below:24.JPG

Note: Choice1, Choice2, Choice3 and Choice4 are all Choice type column with 4 options. Lookup1, Lookup2, Lookup3 and Lookup4 are all Lookup type column. Number1, Number2, Number3 and Number4 are all Number type column. Calculated1 is a Calculated type column, the calculated expression of Calculated1 column as below:28.JPG

 

I have made a test on my side and please take a try with the following workaround:

  • Add a "When an item is created" trigger.
  • Add a "Update item" action, Number1 field set to following formula:

 

triggerBody()?['Lookup1']?['Value']

Number2 field set to following formula:

 

triggerBody()?['Lookup2']?['Value']

Number3 field set to following formula:

triggerBody()?['Lookup3']?['Value']

Number4 field set to following formula:

triggerBody()?['Lookup4']?['Value']

Image reference:25.JPG

The flow works successfully as below:26.JPG

 

27.JPG

 

 

Best regards,

Kris

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 112 members 3,051 guests
Please welcome our newest community members: