<?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 Dashboard Indicator with Reference and Advanced Formatting in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/dashboard-indicator-with-reference-and-advanced/m-p/1594349#M10860</link>
    <description>&lt;P&gt;I'm needing to add the Estimated, Actual, and Differences for my data in an Indicator.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="aprhyde11_0-1741710904884.png" style="width: 189px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/127649i660D775779D01F12/image-dimensions/189x65?v=v2" width="189" height="65" role="button" title="aprhyde11_0-1741710904884.png" alt="aprhyde11_0-1741710904884.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Under the Data tab, I have the Actual Cost set up as a reference to the Estimated Cost. Everything works fine unless the Actual Cost is Null, in that case the Indicator reads "No Data". I need it to read the Estimated Cost: $###, Actual Cost: $0 , and Difference: $0&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the expression I'm using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var totalOverall = $datapoint.SUM_TOTAL_OVERALL;  // Your default field
var totalRepairCost = $reference.SUM_TOTAL_REPAIR_COST; // Your alternate field

// If totalRepairCost (actual) is null or empty, set it to 0
var actual = IIf(IsEmpty(totalRepairCost) || totalRepairCost == null, 0, totalRepairCost);

// Round up to the nearest whole number
totalOverall = Ceil(totalOverall);
actual = Ceil(actual);

// Calculate the difference (set to 0 if actual is 0)
var difference = IIf(actual == 0, 0, Ceil(totalOverall - actual));

// Format the numbers with thousand separators
var formattedTotalOverall = Text(totalOverall, '#,##0');
var formattedActual = Text(actual, '#,##0');
var formattedDifference = Text(difference, '#,##0');

return {
  // Text for the "Estimated" value
  topText: 'Estimated: $' + formattedTotalOverall,
  topTextColor: '',
  topTextOutlineColor: '',
  topTextMaxSize: 'medium',
  
  // Only show "Actual" and "Difference" if actual is not 0
  middleText: IIf(actual != 0, 'Actual: $' + formattedActual, ''),
  middleTextColor: '',
  middleTextOutlineColor: '',
  middleTextMaxSize: 'large',
  
  bottomText: IIf(actual != 0, 'Difference: $' + formattedDifference, ''),
  bottomTextColor: '',
  bottomTextOutlineColor: '',
  bottomTextMaxSize: 'x-small',
  
  // Ensure no "No Data" message is shown
  noValue: false
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I realize it's a bit overcomplicated at the moment, but it's working for the most part.&lt;/P&gt;&lt;P&gt;How do I get the Indicator to still show data when Actual Cost = Null?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help!&lt;/P&gt;</description>
    <pubDate>Tue, 11 Mar 2025 17:04:21 GMT</pubDate>
    <dc:creator>aprhyde11</dc:creator>
    <dc:date>2025-03-11T17:04:21Z</dc:date>
    <item>
      <title>Dashboard Indicator with Reference and Advanced Formatting</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/dashboard-indicator-with-reference-and-advanced/m-p/1594349#M10860</link>
      <description>&lt;P&gt;I'm needing to add the Estimated, Actual, and Differences for my data in an Indicator.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="aprhyde11_0-1741710904884.png" style="width: 189px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/127649i660D775779D01F12/image-dimensions/189x65?v=v2" width="189" height="65" role="button" title="aprhyde11_0-1741710904884.png" alt="aprhyde11_0-1741710904884.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Under the Data tab, I have the Actual Cost set up as a reference to the Estimated Cost. Everything works fine unless the Actual Cost is Null, in that case the Indicator reads "No Data". I need it to read the Estimated Cost: $###, Actual Cost: $0 , and Difference: $0&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the expression I'm using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var totalOverall = $datapoint.SUM_TOTAL_OVERALL;  // Your default field
var totalRepairCost = $reference.SUM_TOTAL_REPAIR_COST; // Your alternate field

// If totalRepairCost (actual) is null or empty, set it to 0
var actual = IIf(IsEmpty(totalRepairCost) || totalRepairCost == null, 0, totalRepairCost);

// Round up to the nearest whole number
totalOverall = Ceil(totalOverall);
actual = Ceil(actual);

// Calculate the difference (set to 0 if actual is 0)
var difference = IIf(actual == 0, 0, Ceil(totalOverall - actual));

// Format the numbers with thousand separators
var formattedTotalOverall = Text(totalOverall, '#,##0');
var formattedActual = Text(actual, '#,##0');
var formattedDifference = Text(difference, '#,##0');

return {
  // Text for the "Estimated" value
  topText: 'Estimated: $' + formattedTotalOverall,
  topTextColor: '',
  topTextOutlineColor: '',
  topTextMaxSize: 'medium',
  
  // Only show "Actual" and "Difference" if actual is not 0
  middleText: IIf(actual != 0, 'Actual: $' + formattedActual, ''),
  middleTextColor: '',
  middleTextOutlineColor: '',
  middleTextMaxSize: 'large',
  
  bottomText: IIf(actual != 0, 'Difference: $' + formattedDifference, ''),
  bottomTextColor: '',
  bottomTextOutlineColor: '',
  bottomTextMaxSize: 'x-small',
  
  // Ensure no "No Data" message is shown
  noValue: false
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I realize it's a bit overcomplicated at the moment, but it's working for the most part.&lt;/P&gt;&lt;P&gt;How do I get the Indicator to still show data when Actual Cost = Null?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 17:04:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/dashboard-indicator-with-reference-and-advanced/m-p/1594349#M10860</guid>
      <dc:creator>aprhyde11</dc:creator>
      <dc:date>2025-03-11T17:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: Dashboard Indicator with Reference and Advanced Formatting</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/dashboard-indicator-with-reference-and-advanced/m-p/1652606#M11447</link>
      <description>&lt;P&gt;Hey, did you ever solve this? I'm having the same issue.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Sep 2025 20:33:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/dashboard-indicator-with-reference-and-advanced/m-p/1652606#M11447</guid>
      <dc:creator>StephanieSimpson2</dc:creator>
      <dc:date>2025-09-23T20:33:37Z</dc:date>
    </item>
  </channel>
</rss>

