{"id":2328,"date":"2022-01-01T00:00:00","date_gmt":"2022-01-01T00:00:00","guid":{"rendered":"https:\/\/365stack.in\/?p=2328"},"modified":"2022-01-03T11:07:38","modified_gmt":"2022-01-03T11:07:38","slug":"how-to-round-up-down-decimal-in-power-automate","status":"publish","type":"post","link":"https:\/\/365stack.in\/index.php\/2022\/01\/01\/how-to-round-up-down-decimal-in-power-automate\/","title":{"rendered":"How to Round (Up; Down) Decimal in Power Automate"},"content":{"rendered":"\n<p>Decimal numeric Round-off is a renowned Math operation, that will always be a necessity while working with numbers irrespective of its complexity.<\/p>\n\n\n\n<p>When it comes to Canvas app, we have multiple built-in methods available for Rounding a decimal namely <strong>Round<\/strong>, <strong>RoundDown<\/strong> and <strong>RoundUp<\/strong>.<\/p>\n\n\n\n<p><strong>Round<\/strong>(<em>Number<\/em>,&nbsp;<em>DecimalPlaces<\/em>)<br><strong>RoundDown<\/strong>(<em>Number<\/em>,&nbsp;<em>DecimalPlaces<\/em>)<br><strong>RoundUp<\/strong>(<em>Number<\/em>,&nbsp;<em>DecimalPlaces<\/em>)<\/p>\n\n\n\n<p>We also have scenarios to Round-off the decimal values in Power Automate. But, to our surprise Microsoft has no specific function provided in the expressions, instead we will have to use an action named &#8220;<strong>Format Number<\/strong>&#8221; under &#8220;<strong>Number Functions<\/strong>&#8221; category.<\/p>\n\n\n\n<pre class=\"wp-block-verse\">Format number only does a Round function in a traditional way by rounding up if the decimal digit is 5 or higher. Otherwise, this function rounds down. For Instance: \n1.1 to 1, \n1.5 to 2. <\/pre>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<div class=\"wp-block-jetpack-slideshow aligncenter\" data-effect=\"slide\"><div class=\"wp-block-jetpack-slideshow_container swiper-container\"><ul class=\"wp-block-jetpack-slideshow_swiper-wrapper swiper-wrapper\"><li class=\"wp-block-jetpack-slideshow_slide swiper-slide\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"470\" alt=\"\" class=\"wp-block-jetpack-slideshow_image wp-image-2342\" data-id=\"2342\" src=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/12\/Format-1.png?resize=640%2C470&#038;ssl=1\" srcset=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/12\/Format-1.png?w=775&amp;ssl=1 775w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/12\/Format-1.png?w=300&amp;ssl=1 300w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/12\/Format-1.png?w=768&amp;ssl=1 768w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/figure><\/li><li class=\"wp-block-jetpack-slideshow_slide swiper-slide\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"560\" height=\"729\" alt=\"\" class=\"wp-block-jetpack-slideshow_image wp-image-2343\" data-id=\"2343\" src=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/12\/Formatted-Output-1.png?resize=560%2C729&#038;ssl=1\" srcset=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/12\/Formatted-Output-1.png?w=560&amp;ssl=1 560w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/12\/Formatted-Output-1.png?w=230&amp;ssl=1 230w\" sizes=\"auto, (max-width: 560px) 100vw, 560px\" data-recalc-dims=\"1\" \/><\/figure><\/li><\/ul><a class=\"wp-block-jetpack-slideshow_button-prev swiper-button-prev swiper-button-white\" role=\"button\"><\/a><a class=\"wp-block-jetpack-slideshow_button-next swiper-button-next swiper-button-white\" role=\"button\"><\/a><a aria-label=\"Pause Slideshow\" class=\"wp-block-jetpack-slideshow_button-pause\" role=\"button\"><\/a><div class=\"wp-block-jetpack-slideshow_pagination swiper-pagination swiper-pagination-white\"><\/div><\/div><\/div>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\"><\/div><\/div>\n\n\n\n<p>This <strong>Format Number <\/strong>action enables us to perform a variety of number formatting options easily by leveraging number formatting patterns like other Power Platform services. Formatting a number includes a custom format, which is used to Round up a decimal value to an integer just by specifying &#8220;<strong>#<\/strong>&#8221; in the format field. This action also can <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2341\" data-permalink=\"https:\/\/365stack.in\/index.php\/2022\/01\/01\/how-to-round-up-down-decimal-in-power-automate\/format-number-optins\/\" data-orig-file=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/12\/Format-number-optins.png?fit=826%2C311&amp;ssl=1?v=1640982980\" data-orig-size=\"826,311\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Format-number-optins\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/12\/Format-number-optins.png?fit=300%2C113&amp;ssl=1?v=1640982980\" data-large-file=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/12\/Format-number-optins.png?fit=640%2C241&amp;ssl=1?v=1640982980\" src=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/12\/Format-number-optins.png?resize=482%2C182&#038;ssl=1\" alt=\"\" class=\"wp-image-2341\" width=\"482\" height=\"182\" srcset=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/12\/Format-number-optins.png?w=826&amp;ssl=1 826w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/12\/Format-number-optins.png?w=300&amp;ssl=1 300w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/12\/Format-number-optins.png?w=768&amp;ssl=1 768w\" sizes=\"auto, (max-width: 482px) 100vw, 482px\" data-recalc-dims=\"1\" \/><\/figure><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>Format the&nbsp;appearance&nbsp;of the number based on typical patterns such as Currency($) formats.<\/li><li>Custom formatting patterns likely to Excel, Power BI and Power Apps expressions.<\/li><li>Try currency formats as per the business requirements, specific to locales.<\/li><li>Also formats C2 (currency with two decimal places), and N2 (negative number with two decimal places). <\/li><\/ul>\n\n\n\n<pre class=\"wp-block-verse\">For a customized Round up option like \n1.1 -&gt; 2;\n1.5 -&gt; 2, a manual arithmetic expression should be built within the variable action.<\/pre>\n\n\n\n<div class=\"wp-block-jetpack-slideshow aligncenter\" data-effect=\"slide\"><div class=\"wp-block-jetpack-slideshow_container swiper-container\"><ul class=\"wp-block-jetpack-slideshow_swiper-wrapper swiper-wrapper\"><li class=\"wp-block-jetpack-slideshow_slide swiper-slide\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"400\" alt=\"\" class=\"wp-block-jetpack-slideshow_image wp-image-2332\" data-id=\"2332\" src=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/12\/Round-up-formula-1024x640.png?resize=640%2C400&#038;ssl=1\" srcset=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/12\/Round-up-formula.png?w=1024&amp;ssl=1 1024w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/12\/Round-up-formula.png?w=300&amp;ssl=1 300w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/12\/Round-up-formula.png?w=768&amp;ssl=1 768w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/12\/Round-up-formula.png?w=1288&amp;ssl=1 1288w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><\/figure><\/li><li class=\"wp-block-jetpack-slideshow_slide swiper-slide\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"628\" height=\"753\" alt=\"\" class=\"wp-block-jetpack-slideshow_image wp-image-2333\" data-id=\"2333\" src=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/12\/Round-up.png?resize=628%2C753&#038;ssl=1\" srcset=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/12\/Round-up.png?w=628&amp;ssl=1 628w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/12\/Round-up.png?w=250&amp;ssl=1 250w\" sizes=\"auto, (max-width: 628px) 100vw, 628px\" data-recalc-dims=\"1\" \/><\/figure><\/li><\/ul><a class=\"wp-block-jetpack-slideshow_button-prev swiper-button-prev swiper-button-white\" role=\"button\"><\/a><a class=\"wp-block-jetpack-slideshow_button-next swiper-button-next swiper-button-white\" role=\"button\"><\/a><a aria-label=\"Pause Slideshow\" class=\"wp-block-jetpack-slideshow_button-pause\" role=\"button\"><\/a><div class=\"wp-block-jetpack-slideshow_pagination swiper-pagination swiper-pagination-white\"><\/div><\/div><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;<strong>Expression<\/strong>&gt; \nif(and(less(int(last(split(string(variables('varIntDecimal')),'.'))),int(9)), \ngreaterOrEquals(int(last(split(string(variables('varIntDecimal')),'.'))),int(1))),\nadd(int(first(split(string(variables('varIntDecimal')),'.'))),1), int(first(split(string(variables('varIntDecimal')),'.'))))<\/code><\/pre>\n\n\n\n<p>You can also customize a decimal numeric with formatting options based on locale. Also, build your own expressions for formatting a numeric based on a custom requirement apart from the traditional round-off. In case of queries, please post your &#8217;em in the comments section.<\/p>\n\n\n\n<p>Stay Tuned! Happy Building&#8230; \ud83d\ude42<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Decimal numeric Round-off is a renowned Math operation, that will always be a necessity while working with numbers irrespective of its complexity. When it comes to Canvas app, we have multiple built-in methods available for Rounding a decimal namely Round, RoundDown and RoundUp. Round(Number,&nbsp;DecimalPlaces)RoundDown(Number,&nbsp;DecimalPlaces)RoundUp(Number,&nbsp;DecimalPlaces) We also have scenarios to Round-off the decimal values in Power Automate. But, to our surprise [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":2358,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[8,32],"tags":[12,94,89,90,93,92,96,91,33,9,10],"class_list":["post-2328","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-power-automate","category-power-platform","tag-canvas-app","tag-currency-formats","tag-expression","tag-format-number","tag-formatting","tag-math-operations","tag-ms-flows","tag-number-functions","tag-power-platform","tag-powerapps","tag-powerautomate"],"jetpack_publicize_connections":[],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2022\/01\/UP.png?fit=632%2C367&ssl=1?v=1641208036","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":2278,"url":"https:\/\/365stack.in\/index.php\/2021\/12\/28\/how-to-send-json-data-to-canvas-apps\/","url_meta":{"origin":2328,"position":0},"title":"How to send JSON data to Canvas Apps","author":"Premkumar Perumal","date":"December 28, 2021","format":false,"excerpt":"We're going to explain how to send a JSON response from Power Automate to Canvas app and how to convert the response into Collection format in Canvas app. To illustrate, we have explained a small app as example. As First step, create a new Instant flow that can be triggered\u2026","rel":"","context":"In &quot;Canvas Apps&quot;","block_context":{"text":"Canvas Apps","link":"https:\/\/365stack.in\/index.php\/category\/power-platform\/powerapps\/canvas-apps\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/12\/Screenshot-2021-12-28-103100.png?fit=836%2C391&ssl=1%3Fv%3D1640667678&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":2060,"url":"https:\/\/365stack.in\/index.php\/2021\/12\/12\/how-to-stop-infinite-flow-trigger-in-power-automate-using-flag-column\/","url_meta":{"origin":2328,"position":1},"title":"How to stop infinite flow trigger in Power Automate using flag column","author":"Hemanthkumar Rajan","date":"December 12, 2021","format":false,"excerpt":"Infinite flow trigger is a common scenario in workflow softwares like Nintex, K2 and even in Power Automate. If the Canvas app is involved in this process we can handle it easily with the \"Flag\" column. Create a Flag column with default values as \"Yes\" Flag Column Customize form for\u2026","rel":"","context":"In &quot;Canvas Apps&quot;","block_context":{"text":"Canvas Apps","link":"https:\/\/365stack.in\/index.php\/category\/power-platform\/powerapps\/canvas-apps\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/12\/Screenshot-530.png?fit=1200%2C562&ssl=1%3Fv%3D1639337681&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1414,"url":"https:\/\/365stack.in\/index.php\/2021\/08\/05\/a-complete-guide-for-migration-to-power-platform-best-practices\/","url_meta":{"origin":2328,"position":2},"title":"A Complete Guide for Migration to Power Platform: Best Practices","author":"Hemanthkumar Rajan","date":"August 5, 2021","format":false,"excerpt":"This is the 5th part of the migration series, Kindly read the previous post before proceeding further, Best Practices are the important aspect of the conversion life cycle. When you do an activity repeatedly it becomes a practice. If that practice brings success to the project then it is called\u2026","rel":"","context":"In &quot;Power Platform&quot;","block_context":{"text":"Power Platform","link":"https:\/\/365stack.in\/index.php\/category\/power-platform\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/08\/best-practice-cover-e1628180613931.png?fit=600%2C280&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1640,"url":"https:\/\/365stack.in\/index.php\/2021\/12\/03\/how-to-create-csv-file-in-power-automate\/","url_meta":{"origin":2328,"position":3},"title":"How to create CSV file in Power Automate","author":"Hemanthkumar Rajan","date":"December 3, 2021","format":false,"excerpt":"Export to CSV is one of the common requirements in any application. But in this example, we are not going to show the procedure from the app that will be shared in a separate post. Here we are getting the data from Power Automate itself to support a large set\u2026","rel":"","context":"In &quot;Power Automate&quot;","block_context":{"text":"Power Automate","link":"https:\/\/365stack.in\/index.php\/category\/power-platform\/power-automate\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-229.png?fit=934%2C596&ssl=1%3Fv%3D1637940499&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1310,"url":"https:\/\/365stack.in\/index.php\/2021\/07\/28\/a-complete-guide-for-migration-to-power-platform-analysis-development-part-2\/","url_meta":{"origin":2328,"position":4},"title":"A Complete Guide for Migration to Power Platform: Analysis &#038; Development &#8211; Part 2","author":"Hemanthkumar Rajan","date":"July 28, 2021","format":false,"excerpt":"This is a continuation post on the Analysis and Development series, have a look at Part -1 of this post for a better understanding. After properly analyzing the existing system, we might be in a good position to start the development. Let's see the list of things that should be\u2026","rel":"","context":"In &quot;Power Platform&quot;","block_context":{"text":"Power Platform","link":"https:\/\/365stack.in\/index.php\/category\/power-platform\/"},"img":{"alt_text":"Requirement Analysis","src":"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/07\/Requirement-Analysis.png?fit=1100%2C700&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1937,"url":"https:\/\/365stack.in\/index.php\/2022\/07\/01\/how-to-integrate-automation-anywhere-iq-bot-with-power-platform\/","url_meta":{"origin":2328,"position":5},"title":"How to integrate Automation Anywhere IQ Bot with Power Platform","author":"Hemanthkumar Rajan","date":"July 1, 2022","format":false,"excerpt":"This is a continuation of the OCR series, previously we showed how to extract data from PDF using Power Platform\"AI Builder\" and Azure \"Form Recognizer\". In this post, we will see how to extract data using IQ Bot. Automation Anywhere is one of the leading RPA tools, In Power Platform\u2026","rel":"","context":"In &quot;Power Automate&quot;","block_context":{"text":"Power Automate","link":"https:\/\/365stack.in\/index.php\/category\/power-platform\/power-automate\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/12\/Screenshot-380.png?fit=1051%2C631&ssl=1%3Fv%3D1639057573&resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/365stack.in\/index.php\/wp-json\/wp\/v2\/posts\/2328","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/365stack.in\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/365stack.in\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/365stack.in\/index.php\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/365stack.in\/index.php\/wp-json\/wp\/v2\/comments?post=2328"}],"version-history":[{"count":13,"href":"https:\/\/365stack.in\/index.php\/wp-json\/wp\/v2\/posts\/2328\/revisions"}],"predecessor-version":[{"id":2360,"href":"https:\/\/365stack.in\/index.php\/wp-json\/wp\/v2\/posts\/2328\/revisions\/2360"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/365stack.in\/index.php\/wp-json\/wp\/v2\/media\/2358"}],"wp:attachment":[{"href":"https:\/\/365stack.in\/index.php\/wp-json\/wp\/v2\/media?parent=2328"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/365stack.in\/index.php\/wp-json\/wp\/v2\/categories?post=2328"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/365stack.in\/index.php\/wp-json\/wp\/v2\/tags?post=2328"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}