<?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 Using an expression as dimension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-an-expression-as-dimension/m-p/651634#M238290</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to make several rolling time period charts of varying length for a dashboard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using the following expression for my dimension (field is "LDate" which is a date from my linked calendar):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=IF((Num(LDate)) &amp;gt;= Num(Today()-7), LDate)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I expected to see was a chart with 7 days listed.&amp;nbsp; However here's what displays:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jiveImage" src="https://community.qlik.com/legacyfs/online/68185_pastedImage_0.png" style="width: 620px; height: 309px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why is "today" not showing up as a date but as a - mark and showing my entire data count instead of for today only?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Oct 2014 15:48:59 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-10-02T15:48:59Z</dc:date>
    <item>
      <title>Using an expression as dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Using-an-expression-as-dimension/m-p/651634#M238290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to make several rolling time period charts of varying length for a dashboard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using the following expression for my dimension (field is "LDate" which is a date from my linked calendar):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=IF((Num(LDate)) &amp;gt;= Num(Today()-7), LDate)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I expected to see was a chart with 7 days listed.&amp;nbsp; However here's what displays:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jiveImage" src="https://community.qlik.com/legacyfs/online/68185_pastedImage_0.png" style="width: 620px; height: 309px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why is "today" not showing up as a date but as a - mark and showing my entire data count instead of for today only?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Oct 2014 15:48:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-an-expression-as-dimension/m-p/651634#M238290</guid>
      <dc:creator />
      <dc:date>2014-10-02T15:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using an expression as dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Using-an-expression-as-dimension/m-p/651635#M238291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to put the filter in your expression not the dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use LDate as your dimension&lt;/P&gt;&lt;P&gt;Created Expression&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = count( {&amp;lt;DateCreated={"&amp;gt;$(=today()-7)&amp;lt;=$(=today())"}&amp;gt;} YourDataID )&lt;/P&gt;&lt;P&gt;ResolvedExpression&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = count( {&amp;lt;DateResolved={"&amp;gt;$(=today()-7)&amp;lt;=$(=today())"}&amp;gt;} YourDataID )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Obviously you will need to change DateCreated, DateResolved and YourDataID to match your field names&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Oct 2014 15:56:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-an-expression-as-dimension/m-p/651635#M238291</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2014-10-02T15:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: Using an expression as dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Using-an-expression-as-dimension/m-p/651636#M238292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should set your dimension to "Supress when value is null"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your expression will set LDate as null for every date apart from the past 7 days. This is the total you are seeing in the ( - ) column.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Oct 2014 15:59:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-an-expression-as-dimension/m-p/651636#M238292</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2014-10-02T15:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: Using an expression as dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Using-an-expression-as-dimension/m-p/651637#M238293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It worked perfectly.&amp;nbsp; I'm assuming if I wanted prior X months I'd rewrite as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Created Expression&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;= count( {&amp;lt;Month(DateCreated)={"&amp;gt;$(=Month(today())-X)&amp;lt;=Month($(=today()))"}&amp;gt;} YourDataID )&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Oct 2014 16:15:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-an-expression-as-dimension/m-p/651637#M238293</guid>
      <dc:creator />
      <dc:date>2014-10-02T16:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: Using an expression as dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Using-an-expression-as-dimension/m-p/651638#M238294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Set&amp;nbsp; Analysis works on the field names not and expression, so for prior X months you can use Addmonths()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Created Expression&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;= count( {&amp;lt;DateCreated={"&amp;gt;$(=Addmonths(today(), -X) )&amp;lt;=($(=today()) "}&amp;gt;} YourDataID )&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also use monthstart() or monthend() to get the start or end of the month&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Oct 2014 16:26:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-an-expression-as-dimension/m-p/651638#M238294</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2014-10-02T16:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: Using an expression as dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Using-an-expression-as-dimension/m-p/651639#M238295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, one final stupid question.&amp;nbsp; I'm trying to get my dynamic dimension to do X number of months.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=If (Num(Month(LDate)) &amp;gt;= Num(Month(Today())) - 3, MonthYear)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And several variations but its always showing my entire data set.&amp;nbsp; What am I doing wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Oct 2014 21:03:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-an-expression-as-dimension/m-p/651639#M238295</guid>
      <dc:creator />
      <dc:date>2014-10-02T21:03:57Z</dc:date>
    </item>
  </channel>
</rss>

