<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:clearspace="http://www.jivesoftware.com/xmlns/jive/rss" version="2.0">
  <channel>
    <title>Content in Tableau Community Forums</title>
    <link>/profile-content.jspa?filterID=contentstatus[published]&amp;targetUser=22161</link>
    <description>Recent content in Tableau Community Forums</description>
    <language>en</language>
    <pubDate>Fri, 19 Apr 2013 04:16:08 GMT</pubDate>
    <generator>Jive Engage 8.0.5.0  (http://jivesoftware.com/products/)</generator>
    <dc:date>2013-04-19T04:16:08Z</dc:date>
    <dc:language>en</dc:language>
    <item>
      <title>Calculation Rollup to Error instead of 0</title>
      <link>https://community.tableau.com/thread/125404</link>
      <description>&lt;!-- [DocumentBodyStart:0fb079e3-3a94-4a17-a701-a80d9351a3a0] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;I have data like this:&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;#160;&lt;/p&gt;&lt;table border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;thead&gt;&lt;tr&gt;&lt;th style="border:1px solid black;border: 1px solid rgb(0, 0, 0);padding: 2px;color: #ffffff;background-color: #6690bc;text-align: center;" valign="middle"&gt;year&lt;br/&gt;&lt;/th&gt;&lt;th style="border:1px solid black;border: 1px solid rgb(0, 0, 0);padding: 2px;color: #ffffff;background-color: #6690bc;text-align: center;" valign="middle"&gt;# of things&lt;br/&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="border:1px solid black;border: 1px solid rgb(0, 0, 0);padding: 2px;"&gt;2011&lt;/td&gt;&lt;td style="border:1px solid black;border: 1px solid rgb(0, 0, 0);padding: 2px;"&gt;NULL&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border:1px solid black;border: 1px solid rgb(0, 0, 0);padding: 2px;"&gt;2012&lt;/td&gt;&lt;td style="border:1px solid black;border: 1px solid rgb(0, 0, 0);padding: 2px;"&gt;NULL&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border:1px solid black;border: 1px solid rgb(0, 0, 0);padding: 2px;"&gt;2013&lt;/td&gt;&lt;td style="border:1px solid black;border: 1px solid rgb(0, 0, 0);padding: 2px;"&gt;100&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;#160;&lt;/p&gt;&lt;p&gt;I have a parameter that will filter by year or display a sum of all time.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;#160;&lt;/p&gt;&lt;p&gt;When I sum all time, the sum of "# of things" rolls up to 100. It sums 2011 and 2012 as 0. Instead, I'd like to have it display an error.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;#160;&lt;/p&gt;&lt;p&gt;I've tried several different approaches of a calculated field but none have worked. The result needs to be a continuous measure or an error. This feels like a fairly straightforward function but I can't find it. Any help is appreciated.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;#160;&lt;/p&gt;&lt;p&gt;Thanks,&lt;/p&gt;&lt;p&gt;Bryce&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;#160;&lt;/p&gt;&lt;p&gt;Some attempts at calculated fields:&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;#160;&lt;/p&gt;&lt;p&gt;IF ZN([# of things]) == 0&lt;/p&gt;&lt;p&gt;THEN "ERROR"&lt;/p&gt;&lt;p&gt;ELSE [# of things]&lt;/p&gt;&lt;p&gt;END&lt;/p&gt;&lt;p&gt;# fails because return values are not same type&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;#160;&lt;/p&gt;&lt;p&gt;IF ZN([# of things]) == 0&lt;/p&gt;&lt;p&gt;THEN "ERROR"&lt;/p&gt;&lt;p&gt;ELSE STR([# of things])&lt;/p&gt;&lt;p&gt;END&lt;/p&gt;&lt;p&gt;# fails because not continuous measure&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:0fb079e3-3a94-4a17-a701-a80d9351a3a0] --&gt;</description>
      <category domain="https://community.tableau.com/tags#/?containerType=14&amp;container=2003">7.0</category>
      <category domain="https://community.tableau.com/tags#/?containerType=14&amp;container=2003">calculation</category>
      <category domain="https://community.tableau.com/tags#/?containerType=14&amp;container=2003">aggregation</category>
      <pubDate>Fri, 19 Apr 2013 04:16:08 GMT</pubDate>
      <author>tableaucommunity@tableau.com</author>
      <guid>https://community.tableau.com/thread/125404</guid>
      <dc:date>2013-04-19T04:16:08Z</dc:date>
      <clearspace:dateToText>6 years 2 months ago</clearspace:dateToText>
      <clearspace:replyCount>4</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
  </channel>
</rss>

