{"id":5047,"date":"2019-08-16T10:49:37","date_gmt":"2019-08-16T17:49:37","guid":{"rendered":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/power-apps\/simplify-formulas-with-the-with-function\/"},"modified":"2025-06-11T08:02:32","modified_gmt":"2025-06-11T15:02:32","slug":"simplify-formulas-with-the-with-function","status":"publish","type":"post","link":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/power-apps\/simplify-formulas-with-the-with-function\/","title":{"rendered":"Simplify formulas with the With function"},"content":{"rendered":"<p>Welcome the <a href=\"https:\/\/docs.microsoft.com\/en-us\/powerapps\/maker\/canvas-apps\/functions\/function-with\"><strong>With <\/strong>function<\/a> to Canvas apps!\u00a0 You can now simplify large formulas by dividing them into named sub-formulas, eliminate redundant sub-formulas, and easily work with functions that return records.\u00a0 All while staying declarative and automatically responding to dependency changes.<\/p>\n<p>That&#8217;s a mouthful, it&#8217;s easier to show you.\u00a0 Let&#8217;s create a simple mortgage calculator to calculate monthly loan payments:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-5235\" height=\"344\" src=\"https:\/\/powerappsblogmedia.azureedge.net\/powerappsblog\/2019\/08\/2019-08-15_23h23_45.gif\" width=\"684\"\/><\/p>\n<p>Today, the payment calculation in this app would be a bit complex:<\/p>\n<pre>(RateSlider\/8\/100\/12)*(AmountSlider*10000) \/ (1-(1+(RateSlider\/8\/100\/12))^(-(YearsSlider*12)))<\/pre>\n<p>Hmm, I wonder if that is even correct?\u00a0 It&#8217;s hard to tell, there is a lot going in here.\u00a0 Let&#8217;s start to unpack this with <strong>With<\/strong>.\u00a0 The core of the calculation is the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Mortgage_calculator#Monthly_payment_formula\">well known interest formula<\/a> c = rP \/ (1 \u2212 (1+r)<sup>\u2212n<\/sup>) where <em>r<\/em> is interest rate, <em>P<\/em> the loan amount, <em>n<\/em> the number of payments, and <em>c<\/em> the resulting payment amount.\u00a0 Let&#8217;s use that formula verbatim with named values that pull apart the formula into small sub-formulas:<\/p>\n<pre>With( { r:\u00a0RateSlider\/8\/100\/12,     \/\/ interest rate\n        P:\u00a0AmountSlider*10000,      \/\/ loan amount\n        n:\u00a0YearsSlider*12 },        \/\/ number of payments\n      r*P \/ (1 \u2212 (1+r)^-n) )        \/\/ standard interest calculation<\/pre>\n<p>Great, that&#8217;s a lot clearer.\u00a0 \u00a0We just created named values that we could plug in to our standard formula.\u00a0 Besides making it simpler, we can reuse the value for <em>r<\/em> in two places, eliminating the redundant sub-formulas and the chance that the two get out of sync.\u00a0 These names values are scoped to this\u00a0<strong>With<\/strong>.<\/p>\n<p>But those slider calculations are still a bit complicated.\u00a0 It&#8217;s because, although you can set the min and max values on a slider control, the increment is always 1.\u00a0 In the case of the Rate, we want fractional interest rates, so we divide the slider value by 8 to work with 1\/8<sup>th<\/sup> of a percentage point.\u00a0 In the case of the Amount, it is easier to position the slider if we snap to increments of 10,000 by multiplying by that factor.\u00a0 Finally, the interest rate and number of payments need to be in monthly vs. yearly values, requiring the division and multiplication by 12 months respectively.\u00a0 We can pull all these adjustements out into another level of <strong>With<\/strong>:<\/p>\n<pre>With( { AnnualRate: RateSlider\/8\/100,           \/\/ slider moves in 1\/8th increments and convert to percentage\n        Amount: AmountSlider*10000,             \/\/ slider moves by 10,000 increment\n        Years: YearsSlider,                     \/\/ slider moves in single year increments, no adjustment required\n        AnnualPayments: 12 },                   \/\/ number of payments per year\n      With( { r: AnnualRate\/AnnualPayments,     \/\/ interest rate\n              P: Amount,                        \/\/ loan amount\n              n: Years*AnnualPayments },        \/\/ number of payments\n            r*P \/ (1 - (1+r)^-n)                \/\/ standard interest calculation\n      )\n)<\/pre>\n<p><span style=\"font-size: 1rem;\">Way clearer and easier to verify as correct.\u00a0 \u00a0As long as the names don&#8217;t collide, we have access to all of the values in both\u00a0<strong>With<\/strong> records.<\/span><\/p>\n<p>We have now seen three formulas that do exactly the same thing, no more and no less.\u00a0 And that&#8217;s one of the advantages of\u00a0<strong>With<\/strong>: it can be used anywhere, in any context, to break up a complex formula with no other impact.\u00a0 \u00a0It can be used in any declarative context as shown here, where the app is recalculating the formula automatically as the sliders change value.\u00a0 \u00a0There are no\u00a0<strong>OnChange<\/strong> event handlers used in this app, there are no state variables to manage with\u00a0<a href=\"https:\/\/docs.microsoft.com\/en-us\/powerapps\/maker\/canvas-apps\/functions\/function-set\"><strong>Set<\/strong><\/a>\u00a0or <strong><a href=\"https:\/\/docs.microsoft.com\/en-us\/powerapps\/maker\/canvas-apps\/functions\/function-updatecontext\">UpdateContext<\/a><\/strong>.\u00a0\u00a0<span style=\"font-size: 1rem;\">It is our hope that<\/span><span style=\"font-size: 1rem;\">\u00a0<\/span><strong style=\"font-size: 1rem;\">With<\/strong><span style=\"font-size: 1rem;\">\u00a0<\/span><span style=\"font-size: 1rem;\">will reduce the need for some state variables and thus reduce the complexity of apps.<\/span><\/p>\n<p>The curly braces in the first argument are no accident.\u00a0 We are actually defining a record, similar to how <strong>UpdateContext<\/strong>\u00a0is used.\u00a0 \u00a0<strong>With<\/strong> is a function for creating your own <a href=\"https:\/\/docs.microsoft.com\/en-us\/powerapps\/maker\/canvas-apps\/working-with-tables#record-scope\">record scopes<\/a>, enjoyed by lots of our functions such as <strong>Filter<\/strong> and <strong>Sum<\/strong>.\u00a0 This also means we can pass a record in as the first argument.<\/p>\n<p>Imagine you are working with SQL Server and want to create a record in the <strong>Orders<\/strong> table and then add records to the <strong>OrderDetails<\/strong> table that have a foreign key to it.\u00a0 \u00a0When creating records, the\u00a0<a href=\"https:\/\/docs.microsoft.com\/en-us\/powerapps\/maker\/canvas-apps\/functions\/function-patch\"><strong>Patch<\/strong><\/a>\u00a0function will return the newly create record\u00a0including the server generated primary key.\u00a0 We need to hold on to this value just long enough to use it to <strong>Patch<\/strong> in the <strong>OrderDetails<\/strong> records (held in the <strong>NewOrderDetails<\/strong> collection).\u00a0\u00a0<strong>With<\/strong> can also be used in behavior formulas to do imperative work:<\/p>\n<pre>With( Patch( Orders, Defaults( Orders ), { OrderStatus: \"New\" } ),\n\u00a0 \u00a0 \u00a0 ForAll( NewOrderDetails,\n              Patch( OrderDetails, Defaults( OrderDetails ),\n                     { Order: OrderID,          \/\/ from With's first argument, primary key of Patch result\n                       Quantity: Quantity,      \/\/ from ForAll's NewOrderDetails table\n                       ProductID: ProductID }   \/\/ from ForAll's NewOrderDetails table\n              )\n      )\n)<\/pre>\n<p>We&#8217;d like to do something similar for Common Data Service but we don&#8217;t yet have a way to reference the records from the first arguments of <strong>With<\/strong> and <a href=\"https:\/\/docs.microsoft.com\/en-us\/powerapps\/maker\/canvas-apps\/functions\/function-forall\"><strong>ForAll<\/strong><\/a> as a whole.\u00a0 We are actively working on it.<\/p>\n<p>If you depend on capturing error results from <strong>Patch<\/strong>, there is currently a bug that prevents that from being properly sent through\u00a0<strong>With<\/strong>.\u00a0 The bug has already been fixed and is making its way through our deployment process and should be in your hands in a few weeks.<\/p>\n<p>And we can now finally complete our time parsing journey.\u00a0 \u00a0We started <a href=\"https:\/\/powerapps.microsoft.com\/en-us\/blog\/working-with-time-columns-in-sql-server\/\">last November<\/a> with 39 lines and <a href=\"https:\/\/powerapps.microsoft.com\/en-us\/blog\/more-regular-expressions-for-canvas-apps\/\">in January<\/a> trimmed that to 6 lines.\u00a0 We can now take it to down to 3.\u00a0 The <a href=\"https:\/\/docs.microsoft.com\/en-us\/powerapps\/maker\/canvas-apps\/functions\/function-ismatch\"><strong>Match<\/strong><\/a> function returns a record of the named matches within a regular expression and <strong>With<\/strong> makes it easy to use those values with the\u00a0<a href=\"https:\/\/docs.microsoft.com\/en-us\/powerapps\/maker\/canvas-apps\/functions\/function-date-time\"><strong>Time<\/strong><\/a> function.<\/p>\n<pre>With(\u00a0Match( \"PT2H1M39S\", \"PT(?:(?&lt;hours&gt;\\d+)H)?(?:(?&lt;minutes&gt;\\d+)M)?(?:(?&lt;seconds&gt;\\d+)S)?\" ),\n\u00a0\u00a0\u00a0   Time( Value( hours ), Value( minutes ), Value( seconds ) )\n)<\/pre>\n<p><strong>With<\/strong> might look familiar if you know <a href=\"https:\/\/docs.microsoft.com\/en-us\/dotnet\/visual-basic\/language-reference\/statements\/with-end-with-statement\">Visual Basic&#8217;s With &#8230; End With syntax<\/a>, from which our function got its name.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Welcome the With function to Canvas apps!\u00a0 You can now simplify large formulas by dividing them into named sub-formulas, eliminate redundant sub-formulas, and easily work with functions that return records.\u00a0 All while staying declarative and automatically responding to dependency changes.<\/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":[3424],"job-role":[],"product":[3473],"property":[],"topic":[3421],"coauthors":[2104],"class_list":["post-5047","post","type-post","status-publish","format-standard","hentry","audience-it-professional","content-type-news","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>Simplify formulas with the With function - 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\/2019\/08\/16\/simplify-formulas-with-the-with-function\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Simplify formulas with the With function - Microsoft Power Platform Blog\" \/>\n<meta property=\"og:description\" content=\"Welcome the With function to Canvas apps!\u00a0 You can now simplify large formulas by dividing them into named sub-formulas, eliminate redundant sub-formulas, and easily work with functions that return records.\u00a0 All while staying declarative and automatically responding to dependency changes.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/power-apps\/simplify-formulas-with-the-with-function\/\" \/>\n<meta property=\"og:site_name\" content=\"Microsoft Power Platform Blog\" \/>\n<meta property=\"article:published_time\" content=\"2019-08-16T17:49:37+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-11T15:02:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/wp-content\/uploads\/2019\/08\/2019-08-15_23h23_45.gif\" \/>\n\t<meta property=\"og:image:width\" content=\"684\" \/>\n\t<meta property=\"og:image:height\" content=\"344\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/gif\" \/>\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=\"5 minutes\" \/>\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\/2019\/08\/16\/simplify-formulas-with-the-with-function\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2019\/08\/16\/simplify-formulas-with-the-with-function\/\"},\"author\":[{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/author\/greg-lindhorst\/\",\"@type\":\"Person\",\"@name\":\"Greg Lindhorst\"}],\"headline\":\"Simplify formulas with the With function\",\"datePublished\":\"2019-08-16T17:49:37+00:00\",\"dateModified\":\"2025-06-11T15:02:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2019\/08\/16\/simplify-formulas-with-the-with-function\/\"},\"wordCount\":779,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2019\/08\/16\/simplify-formulas-with-the-with-function\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/powerappsblogmedia.azureedge.net\/powerappsblog\/2019\/08\/2019-08-15_23h23_45.gif\",\"keywords\":[\"Formulas\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2019\/08\/16\/simplify-formulas-with-the-with-function\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2019\/08\/16\/simplify-formulas-with-the-with-function\/\",\"url\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2019\/08\/16\/simplify-formulas-with-the-with-function\/\",\"name\":\"Simplify formulas with the With function - Microsoft Power Platform Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2019\/08\/16\/simplify-formulas-with-the-with-function\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2019\/08\/16\/simplify-formulas-with-the-with-function\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/powerappsblogmedia.azureedge.net\/powerappsblog\/2019\/08\/2019-08-15_23h23_45.gif\",\"datePublished\":\"2019-08-16T17:49:37+00:00\",\"dateModified\":\"2025-06-11T15:02:32+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2019\/08\/16\/simplify-formulas-with-the-with-function\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2019\/08\/16\/simplify-formulas-with-the-with-function\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2019\/08\/16\/simplify-formulas-with-the-with-function\/#primaryimage\",\"url\":\"https:\/\/powerappsblogmedia.azureedge.net\/powerappsblog\/2019\/08\/2019-08-15_23h23_45.gif\",\"contentUrl\":\"https:\/\/powerappsblogmedia.azureedge.net\/powerappsblog\/2019\/08\/2019-08-15_23h23_45.gif\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2019\/08\/16\/simplify-formulas-with-the-with-function\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Simplify formulas with the With function\"}]},{\"@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":"Simplify formulas with the With function - 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\/2019\/08\/16\/simplify-formulas-with-the-with-function\/","og_locale":"en_US","og_type":"article","og_title":"Simplify formulas with the With function - Microsoft Power Platform Blog","og_description":"Welcome the With function to Canvas apps!\u00a0 You can now simplify large formulas by dividing them into named sub-formulas, eliminate redundant sub-formulas, and easily work with functions that return records.\u00a0 All while staying declarative and automatically responding to dependency changes.","og_url":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/power-apps\/simplify-formulas-with-the-with-function\/","og_site_name":"Microsoft Power Platform Blog","article_published_time":"2019-08-16T17:49:37+00:00","article_modified_time":"2025-06-11T15:02:32+00:00","og_image":[{"width":684,"height":344,"url":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/wp-content\/uploads\/2019\/08\/2019-08-15_23h23_45.gif","type":"image\/gif"}],"author":"Greg Lindhorst","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Greg Lindhorst","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2019\/08\/16\/simplify-formulas-with-the-with-function\/#article","isPartOf":{"@id":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2019\/08\/16\/simplify-formulas-with-the-with-function\/"},"author":[{"@id":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/author\/greg-lindhorst\/","@type":"Person","@name":"Greg Lindhorst"}],"headline":"Simplify formulas with the With function","datePublished":"2019-08-16T17:49:37+00:00","dateModified":"2025-06-11T15:02:32+00:00","mainEntityOfPage":{"@id":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2019\/08\/16\/simplify-formulas-with-the-with-function\/"},"wordCount":779,"commentCount":0,"publisher":{"@id":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/#organization"},"image":{"@id":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2019\/08\/16\/simplify-formulas-with-the-with-function\/#primaryimage"},"thumbnailUrl":"https:\/\/powerappsblogmedia.azureedge.net\/powerappsblog\/2019\/08\/2019-08-15_23h23_45.gif","keywords":["Formulas"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2019\/08\/16\/simplify-formulas-with-the-with-function\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2019\/08\/16\/simplify-formulas-with-the-with-function\/","url":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2019\/08\/16\/simplify-formulas-with-the-with-function\/","name":"Simplify formulas with the With function - Microsoft Power Platform Blog","isPartOf":{"@id":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2019\/08\/16\/simplify-formulas-with-the-with-function\/#primaryimage"},"image":{"@id":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2019\/08\/16\/simplify-formulas-with-the-with-function\/#primaryimage"},"thumbnailUrl":"https:\/\/powerappsblogmedia.azureedge.net\/powerappsblog\/2019\/08\/2019-08-15_23h23_45.gif","datePublished":"2019-08-16T17:49:37+00:00","dateModified":"2025-06-11T15:02:32+00:00","breadcrumb":{"@id":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2019\/08\/16\/simplify-formulas-with-the-with-function\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2019\/08\/16\/simplify-formulas-with-the-with-function\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2019\/08\/16\/simplify-formulas-with-the-with-function\/#primaryimage","url":"https:\/\/powerappsblogmedia.azureedge.net\/powerappsblog\/2019\/08\/2019-08-15_23h23_45.gif","contentUrl":"https:\/\/powerappsblogmedia.azureedge.net\/powerappsblog\/2019\/08\/2019-08-15_23h23_45.gif"},{"@type":"BreadcrumbList","@id":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/2019\/08\/16\/simplify-formulas-with-the-with-function\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/"},{"@type":"ListItem","position":2,"name":"Simplify formulas with the With function"}]},{"@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\/5047","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=5047"}],"version-history":[{"count":1,"href":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/posts\/5047\/revisions"}],"predecessor-version":[{"id":130804,"href":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/posts\/5047\/revisions\/130804"}],"wp:attachment":[{"href":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/media?parent=5047"}],"wp:term":[{"taxonomy":"audience","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/audience?post=5047"},{"taxonomy":"content-type","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/content-type?post=5047"},{"taxonomy":"job-role","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/job-role?post=5047"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/product?post=5047"},{"taxonomy":"property","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/property?post=5047"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/topic?post=5047"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/coauthors?post=5047"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}