<?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=28005</link>
    <description>Recent content in Tableau Community Forums</description>
    <language>en</language>
    <pubDate>Wed, 09 Oct 2013 18:05:35 GMT</pubDate>
    <generator>Jive Engage 8.0.5.0  (http://jivesoftware.com/products/)</generator>
    <dc:date>2013-10-09T18:05:35Z</dc:date>
    <dc:language>en</dc:language>
    <item>
      <title>Looking to use MTD Sales measure with filter on Last Date</title>
      <link>https://community.tableau.com/thread/132773</link>
      <description>&lt;!-- [DocumentBodyStart:0dffe480-3ea4-40bf-9108-bc0ecf3e171c] --&gt;&lt;div class="jive-rendered-content"&gt;&lt;p&gt;Trying to create a measure to show MTD &amp;amp; YTD sales.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;#160;&lt;/p&gt;&lt;p&gt;This formula works for MTD Sales:&lt;/p&gt;&lt;p&gt;IF [DOCDATE] &amp;lt;= TODAY() AND DATEDIFF('month',[DOCDATE], TODAY()) = 0 &lt;/p&gt;&lt;p&gt;THEN [SALESAMT] &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;BUT, I need it to be based on the last date in the data group.&lt;/p&gt;&lt;p&gt;Sometimes want to filter data based on Date Range: AS in last July 2013 info&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;#160;&lt;/p&gt;&lt;p&gt;I get an error about mixing aggregated &amp;amp; non-aggregated functions.&lt;/p&gt;&lt;p style="min-height: 8pt; padding: 0px;"&gt;&amp;#160;&lt;/p&gt;&lt;p&gt;When I use the following formula:&lt;/p&gt;&lt;p&gt;IF [DOCDATE] &amp;lt;= TODAY() AND DATEDIFF('month',[DOCDATE], MAX([DOCDATE])) = 0 &lt;/p&gt;&lt;p&gt;THEN [SALESAMT] &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;Any Ideas&lt;/p&gt;&lt;/div&gt;&lt;!-- [DocumentBodyEnd:0dffe480-3ea4-40bf-9108-bc0ecf3e171c] --&gt;</description>
      <pubDate>Wed, 09 Oct 2013 18:05:35 GMT</pubDate>
      <author>tableaucommunity@tableau.com</author>
      <guid>https://community.tableau.com/thread/132773</guid>
      <dc:date>2013-10-09T18:05:35Z</dc:date>
      <clearspace:dateToText>5 years 9 months ago</clearspace:dateToText>
      <clearspace:replyCount>1</clearspace:replyCount>
      <clearspace:objectType>0</clearspace:objectType>
    </item>
  </channel>
</rss>

