{"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 class=\"wp-block-paragraph\">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 class=\"wp-block-paragraph\">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 class=\"wp-block-paragraph\"><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 class=\"wp-block-paragraph\">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 class=\"wp-block-paragraph\">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 class=\"wp-block-paragraph\">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 class=\"wp-block-paragraph\">Stay Tuned! Happy Building&#8230; \ud83d\ude42<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/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":[],"_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}]}}