<?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=11369</link>
    <description>Recent content in Tableau Community Forums</description>
    <language>en</language>
    <pubDate>Fri, 07 Sep 2012 16:14:20 GMT</pubDate>
    <generator>Jive Engage 8.0.5.0  (http://jivesoftware.com/products/)</generator>
    <dc:date>2012-09-07T16:14:20Z</dc:date>
    <dc:language>en</dc:language>
    <item>
      <title>Use Calculated Fields as functions</title>
      <link>https://community.tableau.com/thread/119940</link>
      <description>&lt;!-- [DocumentBodyStart:2d22e16c-ec02-49b0-8c62-e3e7d6bc7bf0] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Hi,&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;#160;&lt;/p&gt;&lt;p&gt;is it possible to use Calculated Fields as functions?&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;#160;&lt;/p&gt;&lt;p&gt;For example, I need to implement this function&lt;/p&gt;&lt;p&gt;"&lt;/p&gt;&lt;p&gt;If [x]&amp;lt;0 then&lt;/p&gt;&lt;p&gt;&amp;#160; param=NULL&lt;/p&gt;&lt;p&gt;else&lt;/p&gt;&lt;p&gt;&amp;#160;&amp;#160;&amp;#160; param=[x]&lt;/p&gt;&lt;p&gt;end&lt;/p&gt;&lt;p&gt;if [y]&amp;gt;0 then&lt;/p&gt;&lt;p&gt;&amp;#160; param=param+[y]&lt;/p&gt;&lt;p&gt;end&lt;/p&gt;&lt;p&gt;return param&lt;/p&gt;&lt;p&gt;"&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;#160;&lt;/p&gt;&lt;p&gt;In Tableau I have to create intermediate calculated field&lt;/p&gt;&lt;p&gt;temp1=&lt;/p&gt;&lt;p&gt;If [x]&amp;lt;0 then&lt;/p&gt;&lt;p&gt;&amp;#160; param=NULL&lt;/p&gt;&lt;p&gt;else&lt;/p&gt;&lt;p&gt;&amp;#160;&amp;#160;&amp;#160; param=[x]&lt;/p&gt;&lt;p&gt;end&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;#160;&lt;/p&gt;&lt;p&gt;Value=&lt;/p&gt;&lt;p&gt;if [y]&amp;gt;0 then&lt;/p&gt;&lt;p&gt;&amp;#160; [temp1]+[y]&lt;/p&gt;&lt;p&gt;else&lt;/p&gt;&lt;p&gt;&amp;#160; [temp1]&lt;/p&gt;&lt;p&gt;end&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:2d22e16c-ec02-49b0-8c62-e3e7d6bc7bf0] --&gt;</description>
      <category domain="https://community.tableau.com/tags#/?containerType=14&amp;container=2003">calculated</category>
      <category domain="https://community.tableau.com/tags#/?containerType=14&amp;container=2003">fields</category>
      <pubDate>Fri, 07 Sep 2012 16:14:20 GMT</pubDate>
      <author>tableaucommunity@tableau.com</author>
      <guid>https://community.tableau.com/thread/119940</guid>
      <dc:date>2012-09-07T16:14:20Z</dc:date>
      <clearspace:dateToText>6 years 10 months ago</clearspace:dateToText>
      <clearspace:replyCount>7</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
  </channel>
</rss>

