<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Formula Expression contained Variable in Dashboards &amp; Analytics Discussions</title>
    <link>https://community.incorta.com/t5/dashboards-analytics-discussions/formula-expression-contained-variable/m-p/6936#M839</link>
    <description>&lt;P&gt;When using formula builder (in insight formulas) I often use the same logic or references multiple times. Excel has the LET function to define a variable contained within the scope of the formula. This improves maintainability and legibility. Does this type of function or feature exist?&lt;/P&gt;&lt;P&gt;Here is a simplistic use case; but, often there may be need for multiple variables and nested variables.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;/* current */
if(
    isNull(sum(SCHEMA.TABLE.COL)),
    0,
    sum(SCHEMA.TABLE.COL)
)

/* desired */
let(var_name, 
    sum(SCHEMA.TABLE.COL), 
    if(
        isNull(var),
        0,
        var
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 13 Mar 2026 22:44:32 GMT</pubDate>
    <dc:creator>treyscheid</dc:creator>
    <dc:date>2026-03-13T22:44:32Z</dc:date>
    <item>
      <title>Formula Expression contained Variable</title>
      <link>https://community.incorta.com/t5/dashboards-analytics-discussions/formula-expression-contained-variable/m-p/6936#M839</link>
      <description>&lt;P&gt;When using formula builder (in insight formulas) I often use the same logic or references multiple times. Excel has the LET function to define a variable contained within the scope of the formula. This improves maintainability and legibility. Does this type of function or feature exist?&lt;/P&gt;&lt;P&gt;Here is a simplistic use case; but, often there may be need for multiple variables and nested variables.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;/* current */
if(
    isNull(sum(SCHEMA.TABLE.COL)),
    0,
    sum(SCHEMA.TABLE.COL)
)

/* desired */
let(var_name, 
    sum(SCHEMA.TABLE.COL), 
    if(
        isNull(var),
        0,
        var
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2026 22:44:32 GMT</pubDate>
      <guid>https://community.incorta.com/t5/dashboards-analytics-discussions/formula-expression-contained-variable/m-p/6936#M839</guid>
      <dc:creator>treyscheid</dc:creator>
      <dc:date>2026-03-13T22:44:32Z</dc:date>
    </item>
  </channel>
</rss>

