{"id":15980,"date":"2021-08-11T09:57:55","date_gmt":"2021-08-11T16:57:55","guid":{"rendered":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/power-apps\/power-fx-int-trunc-weeknum-and-isoweeknum-functions\/"},"modified":"2025-06-11T07:53:00","modified_gmt":"2025-06-11T14:53:00","slug":"power-fx-int-trunc-weeknum-and-isoweeknum-functions","status":"publish","type":"post","link":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/power-apps\/power-fx-int-trunc-weeknum-and-isoweeknum-functions\/","title":{"rendered":"Power Fx: Int, Trunc, WeekNum, and ISOWeekNum functions"},"content":{"rendered":"<p>We have a bit of a tradition on the Power Fx team.\u00a0 As part of onboarding, new team members add a few functions to get up to speed on how the system works internally.\u00a0 Their learning is your gain in more ways than one!<\/p>\n<p>In this installment, we have added four new functions to Power Fx formulas, straight from their definitions in Excel:<\/p>\n<ul>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/powerapps\/maker\/canvas-apps\/functions\/function-round\"><strong>Int<\/strong> and <strong>Trunc<\/strong><\/a> fill out our rounding functions.\u00a0 These are common functions in Excel that until now one would need to translate to one of our Round functions.\u00a0 They are the same for positive numbers, but for negative numbers <strong>Int<\/strong> rounds away from zero and <strong>Trunc<\/strong> rounds toward zero.\u00a0 For example, <strong>Int( -2.4 )<\/strong> returns <strong>-3<\/strong> while <strong>Trunc( -2.4 )<\/strong> returns <strong>-2<\/strong>.<\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/powerapps\/maker\/canvas-apps\/functions\/function-weeknum\"><strong>WeekNum<\/strong> and <strong>ISOWeekNum<\/strong><\/a> have been common customer requests.\u00a0 These functions return the week number in the current year which is helpful for many business date calculations.\u00a0 \u00a0<strong>WeekNum<\/strong> starts with the week containing January 1, while <strong>ISOWeekNum<\/strong> starts with the first Thursday of the year.\u00a0 For example using August 11, 2021, <strong>WeekNum( Today() )<\/strong> returns <strong>33<\/strong> while <strong>ISOWeekNum( Today() )<\/strong> returns <strong>32<\/strong> as we haven&#8217;t made it to Thursday of this week yet.<\/li>\n<\/ul>\n<p>These functions are rolling out now and are available in version 3.21074 or later.<\/p>\n<p>One thing we did not copy from Excel is the treatment of 1900 as a leap year.\u00a0 Power Fx needs to work with dates in Dataverse, SQL Server, and other sources that reach further back into history than 1900 and we didn&#8217;t want a discontinuity at 1900.<\/p>\n<p>As always, your feedback on the <a href=\"https:\/\/powerusers.microsoft.com\/t5\/Power-Apps-Community\/ct-p\/PowerApps1\">Power Apps community forum<\/a> is very helpful to us.\u00a0 The requests and discussion on WeekNum and ISOWeekNum that appeared there directly influenced our decision to implement these functions natively.<\/p>\n<p>\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Excel&#8217;s Int, Trunc, WeekNum, and ISOWeekNum functions are now available for use in Power Fx formulas.<\/p>\n","protected":false},"author":86,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ms_queue_id":[],"ep_exclude_from_search":false,"_classifai_error":"","_classifai_text_to_speech_error":"","_alt_title":"","ms-ems-related-posts":[],"footnotes":""},"audience":[3378],"content-type":[],"job-role":[],"product":[3473],"property":[],"topic":[3421],"coauthors":[2104],"class_list":["post-15980","post","type-post","status-publish","format-standard","hentry","audience-it-professional","product-power-apps","topic-application-modernization"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Power Fx: Int, Trunc, WeekNum, and ISOWeekNum functions - Microsoft Power Platform Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2021\/08\/11\/power-fx-int-trunc-weeknum-and-isoweeknum-functions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Power Fx: Int, Trunc, WeekNum, and ISOWeekNum functions - Microsoft Power Platform Blog\" \/>\n<meta property=\"og:description\" content=\"Excel&#039;s Int, Trunc, WeekNum, and ISOWeekNum functions are now available for use in Power Fx formulas.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/power-apps\/power-fx-int-trunc-weeknum-and-isoweeknum-functions\/\" \/>\n<meta property=\"og:site_name\" content=\"Microsoft Power Platform Blog\" \/>\n<meta property=\"article:published_time\" content=\"2021-08-11T16:57:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-11T14:53:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/wp-content\/uploads\/2023\/12\/Microsoft-logo_rgb_c-gray_950-1.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"950\" \/>\n\t<meta property=\"og:image:height\" content=\"413\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Greg Lindhorst\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Greg Lindhorst\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2021\/08\/11\/power-fx-int-trunc-weeknum-and-isoweeknum-functions\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2021\/08\/11\/power-fx-int-trunc-weeknum-and-isoweeknum-functions\/\"},\"author\":[{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/author\/greg-lindhorst\/\",\"@type\":\"Person\",\"@name\":\"Greg Lindhorst\"}],\"headline\":\"Power Fx: Int, Trunc, WeekNum, and ISOWeekNum functions\",\"datePublished\":\"2021-08-11T16:57:55+00:00\",\"dateModified\":\"2025-06-11T14:53:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2021\/08\/11\/power-fx-int-trunc-weeknum-and-isoweeknum-functions\/\"},\"wordCount\":290,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/#organization\"},\"keywords\":[\"Formulas\",\"Power Fx\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2021\/08\/11\/power-fx-int-trunc-weeknum-and-isoweeknum-functions\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2021\/08\/11\/power-fx-int-trunc-weeknum-and-isoweeknum-functions\/\",\"url\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2021\/08\/11\/power-fx-int-trunc-weeknum-and-isoweeknum-functions\/\",\"name\":\"Power Fx: Int, Trunc, WeekNum, and ISOWeekNum functions - Microsoft Power Platform Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/#website\"},\"datePublished\":\"2021-08-11T16:57:55+00:00\",\"dateModified\":\"2025-06-11T14:53:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2021\/08\/11\/power-fx-int-trunc-weeknum-and-isoweeknum-functions\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2021\/08\/11\/power-fx-int-trunc-weeknum-and-isoweeknum-functions\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2021\/08\/11\/power-fx-int-trunc-weeknum-and-isoweeknum-functions\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Power Fx: Int, Trunc, WeekNum, and ISOWeekNum functions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/#website\",\"url\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/\",\"name\":\"Microsoft Power Platform Blog\",\"description\":\"Innovate with Business Apps\",\"publisher\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/#organization\",\"name\":\"Microsoft Power Platform Blog\",\"url\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/03\/Microsoft-Logo-e1685482038800.png\",\"contentUrl\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/03\/Microsoft-Logo-e1685482038800.png\",\"width\":194,\"height\":145,\"caption\":\"Microsoft Power Platform Blog\"},\"image\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/#\/schema\/person\/dbd4cb8af4503e696f240353831f05d4\",\"name\":\"Greg Lindhorst\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/d2e26bc357423265c4eeeb6a4ed51bd71fb29b8eced3e31f4bc1ccd5bedaf80f?s=96&d=mm&r=g0133d144d5ed416197bd3b29ccd9a59c\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d2e26bc357423265c4eeeb6a4ed51bd71fb29b8eced3e31f4bc1ccd5bedaf80f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d2e26bc357423265c4eeeb6a4ed51bd71fb29b8eced3e31f4bc1ccd5bedaf80f?s=96&d=mm&r=g\",\"caption\":\"Greg Lindhorst\"},\"url\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/author\/gregli\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Power Fx: Int, Trunc, WeekNum, and ISOWeekNum functions - Microsoft Power Platform Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2021\/08\/11\/power-fx-int-trunc-weeknum-and-isoweeknum-functions\/","og_locale":"en_US","og_type":"article","og_title":"Power Fx: Int, Trunc, WeekNum, and ISOWeekNum functions - Microsoft Power Platform Blog","og_description":"Excel's Int, Trunc, WeekNum, and ISOWeekNum functions are now available for use in Power Fx formulas.","og_url":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/power-apps\/power-fx-int-trunc-weeknum-and-isoweeknum-functions\/","og_site_name":"Microsoft Power Platform Blog","article_published_time":"2021-08-11T16:57:55+00:00","article_modified_time":"2025-06-11T14:53:00+00:00","og_image":[{"width":950,"height":413,"url":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/wp-content\/uploads\/2023\/12\/Microsoft-logo_rgb_c-gray_950-1.webp","type":"image\/png"}],"author":"Greg Lindhorst","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Greg Lindhorst","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2021\/08\/11\/power-fx-int-trunc-weeknum-and-isoweeknum-functions\/#article","isPartOf":{"@id":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2021\/08\/11\/power-fx-int-trunc-weeknum-and-isoweeknum-functions\/"},"author":[{"@id":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/author\/greg-lindhorst\/","@type":"Person","@name":"Greg Lindhorst"}],"headline":"Power Fx: Int, Trunc, WeekNum, and ISOWeekNum functions","datePublished":"2021-08-11T16:57:55+00:00","dateModified":"2025-06-11T14:53:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2021\/08\/11\/power-fx-int-trunc-weeknum-and-isoweeknum-functions\/"},"wordCount":290,"commentCount":0,"publisher":{"@id":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/#organization"},"keywords":["Formulas","Power Fx"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2021\/08\/11\/power-fx-int-trunc-weeknum-and-isoweeknum-functions\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2021\/08\/11\/power-fx-int-trunc-weeknum-and-isoweeknum-functions\/","url":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2021\/08\/11\/power-fx-int-trunc-weeknum-and-isoweeknum-functions\/","name":"Power Fx: Int, Trunc, WeekNum, and ISOWeekNum functions - Microsoft Power Platform Blog","isPartOf":{"@id":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/#website"},"datePublished":"2021-08-11T16:57:55+00:00","dateModified":"2025-06-11T14:53:00+00:00","breadcrumb":{"@id":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2021\/08\/11\/power-fx-int-trunc-weeknum-and-isoweeknum-functions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2021\/08\/11\/power-fx-int-trunc-weeknum-and-isoweeknum-functions\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2021\/08\/11\/power-fx-int-trunc-weeknum-and-isoweeknum-functions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/"},{"@type":"ListItem","position":2,"name":"Power Fx: Int, Trunc, WeekNum, and ISOWeekNum functions"}]},{"@type":"WebSite","@id":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/#website","url":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/","name":"Microsoft Power Platform Blog","description":"Innovate with Business Apps","publisher":{"@id":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/#organization","name":"Microsoft Power Platform Blog","url":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/03\/Microsoft-Logo-e1685482038800.png","contentUrl":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/03\/Microsoft-Logo-e1685482038800.png","width":194,"height":145,"caption":"Microsoft Power Platform Blog"},"image":{"@id":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/#\/schema\/person\/dbd4cb8af4503e696f240353831f05d4","name":"Greg Lindhorst","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/d2e26bc357423265c4eeeb6a4ed51bd71fb29b8eced3e31f4bc1ccd5bedaf80f?s=96&d=mm&r=g0133d144d5ed416197bd3b29ccd9a59c","url":"https:\/\/secure.gravatar.com\/avatar\/d2e26bc357423265c4eeeb6a4ed51bd71fb29b8eced3e31f4bc1ccd5bedaf80f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d2e26bc357423265c4eeeb6a4ed51bd71fb29b8eced3e31f4bc1ccd5bedaf80f?s=96&d=mm&r=g","caption":"Greg Lindhorst"},"url":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/author\/gregli\/"}]}},"bloginabox_animated_featured_image":null,"bloginabox_display_generated_audio":false,"distributor_meta":false,"distributor_terms":false,"distributor_media":false,"distributor_original_site_name":"Microsoft Power Platform Blog","distributor_original_site_url":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog","push-errors":false,"_links":{"self":[{"href":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/posts\/15980","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/users\/86"}],"replies":[{"embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/comments?post=15980"}],"version-history":[{"count":1,"href":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/posts\/15980\/revisions"}],"predecessor-version":[{"id":130306,"href":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/posts\/15980\/revisions\/130306"}],"wp:attachment":[{"href":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/media?parent=15980"}],"wp:term":[{"taxonomy":"audience","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/audience?post=15980"},{"taxonomy":"content-type","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/content-type?post=15980"},{"taxonomy":"job-role","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/job-role?post=15980"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/product?post=15980"},{"taxonomy":"property","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/property?post=15980"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/topic?post=15980"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/coauthors?post=15980"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}