Showing results for 
Search instead for 
Did you mean: 
Advocate I
Advocate I

int() conversion function not working -> float to int

When trying to use this function inside a set variable expression I get the following error:


'The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.


Which is weird because the target type would be 'int32' or something like that right?



I am sure the expression I am trying to convert to int() returns a valid float result. It is just the int() conversion that is failing. The original expression which I am trying to convert is:


int(add(div(sub(triggerOutputs()?['body/kema_pedidokgs'], div(variables('teoricoTituloMaquina'),2)),variables('teoricoTituloMaquina')),1))
Advocate I
Advocate I

I have found other posts explaining why int() doesn't work with float values.


It is just incredible then that there is no such thing like a round() or floor() function inside Power automate.



Thank you for your post. Unfortunately at this time we still do not have this implemented into Power Automate. There is always the workaround that was provided in the solution that you linked, and if you would like you can also submit is as a suggestion in our ideas form.








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

Helpful resources

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
Top Kudoed Authors
Users online (4,049)