cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lizzlenizzle
Helper I
Helper I

Increment variable math formula

Hi all,

 

I have a flow I’m trying to make where I take an increment valuable and create a percentage. 
I have a flow for an evaluation SharePoint List where I’m trying to update some fields on a different SharePoint list that summarise the fields on the other list. 

 

I have successfully created a variable for the count, an average of a column, but now I’m trying to create a percentage of an occurrence of some values in a column. 

This column has 4 different possible values (Not at all Confident, Unsure, Confident, Very Confident). I want to find all the Confident and Very Confident for my percentage. I have successfully set up the condition and the output shows it is counting correctly. But then I am trying to then turn it into a calculation and falling short as the input and output is 0. Does anyone have any idea of how to help? 
See my flow below, I’ve circled in red the parts that I can’t get to work. 

F469DF79-DB18-472E-903A-C28B75D35391.jpeg

0AD6A4C2-FA06-49BE-A49F-4BFF29CACF6A.jpeg

69FF6209-A8C3-438F-ACF9-1FA9356451E0.jpeg

96707250-9281-49B7-B420-2059AC06B440.jpeg

 div(variables('Confidence'),outputs('ItemTotal'))

but also tried

mul(div(variables(‘Confidence’),outputs(‘ItemTotal’)),100)

D7A5BDBC-55C4-42C2-A105-D571D9C3B325.jpeg

8DD6B5E2-6D5F-46ED-9F32-9223164AAAF8.jpeg

 then the outputs:

working for increment

C286458F-986A-43FC-B4AF-56FD6B9BD599.png

 not working for compose 

A85E7D5B-59DF-43F6-85B9-1019D23D5BEC.jpeg

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Dual Super User
Dual Super User

Hi @Lizzlenizzle,

 

Can you try and converting the integers to floats. For example try this expression in your compose action (with the name Division).

 

mul(div(float(variables('Confidence')),float(outputs('ItemTotal'))),100)

View solution in original post

2 REPLIES 2
Expiscornovus
Dual Super User
Dual Super User

Hi @Lizzlenizzle,

 

Can you try and converting the integers to floats. For example try this expression in your compose action (with the name Division).

 

mul(div(float(variables('Confidence')),float(outputs('ItemTotal'))),100)

@Expiscornovus 

 

Amazing! It worked, thank you so much! Still getting used to using expressions so this was super helpful!!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

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

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

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

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (3,585)