cancel
Showing results for
Did you mean:
Frequent Visitor

Hi,

I have a form with an Likert question.

 excellent very good bad very bad topic 1 topic 2 topic 3

Depending on the replies I receive for each topic I want to get a value in a Sharepoint column, using this function:

For Topic 1 if:

- excellent is selected I want to get 40*1.5

- very good is selected I want to get 30*1.5

- bad is selected I want to get 20*1.5

- very bad is selected I want to get 10*1.5

For Topic 2 if:

- excellent is selected I want to get 40*1.3

- very good is selected I want to get 30*1.3

- bad is selected I want to get 20*1.3

- very bad is selected I want to get 10*1.3

etc

Then it comes another choice question where again, depending on the choice made, the above score should be multiplied with 10, 15, 20, 25 etc.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User

Hi @mhorian

You could do something like this to calculate topic 1, for example:

The expression would be:

``if(equals(outputs('Get_response_details')?['body/r7427309b6760448ebf6bf3c1e0db0aa5'],'Excellent'),mul(40,1.5),if(equals(outputs('Get_response_details')?['body/r7427309b6760448ebf6bf3c1e0db0aa5'],'Very Good'),mul(30,1.5),if(equals(outputs('Get_response_details')?['body/r7427309b6760448ebf6bf3c1e0db0aa5'],'Bad'),mul(20,1.5),if(equals(outputs('Get_response_details')?['body/r7427309b6760448ebf6bf3c1e0db0aa5'],'Very Bad'),mul(10,1.5),0))))``

Where outputs('Get_response_details')?['body/r7427309b6760448ebf6bf3c1e0db0aa5'] is the answer to topic 1 (this value would depend on your form, so you will need to replace it in the expression).

The expression read the answer value, and depending on the value, returns the values according to your formulas.

Then, you would do the same for the other topics.

Hope it helps!

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!
3 REPLIES 3
Super User

Hi @mhorian

You could do something like this to calculate topic 1, for example:

The expression would be:

``if(equals(outputs('Get_response_details')?['body/r7427309b6760448ebf6bf3c1e0db0aa5'],'Excellent'),mul(40,1.5),if(equals(outputs('Get_response_details')?['body/r7427309b6760448ebf6bf3c1e0db0aa5'],'Very Good'),mul(30,1.5),if(equals(outputs('Get_response_details')?['body/r7427309b6760448ebf6bf3c1e0db0aa5'],'Bad'),mul(20,1.5),if(equals(outputs('Get_response_details')?['body/r7427309b6760448ebf6bf3c1e0db0aa5'],'Very Bad'),mul(10,1.5),0))))``

Where outputs('Get_response_details')?['body/r7427309b6760448ebf6bf3c1e0db0aa5'] is the answer to topic 1 (this value would depend on your form, so you will need to replace it in the expression).

The expression read the answer value, and depending on the value, returns the values according to your formulas.

Then, you would do the same for the other topics.

Hope it helps!

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!
Frequent Visitor

Thanks for the reply! I will try it and let you know! Regards!

Frequent Visitor

Worked like a charm! Thank you!

Announcements

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

#### A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

#### Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.