<?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 Re: Calculated Dimension Giving Days in a Month in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension-Giving-Days-in-a-Month/m-p/1155863#M377141</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunny –&lt;/P&gt;&lt;P&gt;Thanks. I have decided to re-design my data model, and will look at your suggestion once I have completed the transformation.&lt;/P&gt;&lt;P&gt;I will advise the Community if and when I reach a satisfactory outcome.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pete&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Jun 2016 01:12:36 GMT</pubDate>
    <dc:creator>peter_burgess</dc:creator>
    <dc:date>2016-06-03T01:12:36Z</dc:date>
    <item>
      <title>Calculated Dimension Giving Days in a Month</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension-Giving-Days-in-a-Month/m-p/1155853#M377131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;I have a date field, called 'Date'. It is populated with individual days for two complete months (e.g. 01 Apr 2016 through 31 May 2016).&lt;/P&gt;&lt;P&gt;I have a variable, vMonth2, which is the MonthName of the latter month (e.g. May 2016).&lt;/P&gt;&lt;P&gt;I have been trying to create a calculated dimension for a line chart, that gives all the days of the second month (e.g. 01 May 2016 through 31 May 2016) &lt;EM&gt;regardless&lt;/EM&gt; of selections in other dimensions. In essence, I want all of the dates to show along the X axis, whether there are corresponding data points for those dates or not.&lt;/P&gt;&lt;P&gt;I started out with this calculated dimension:&amp;nbsp; &lt;SPAN style="font-size: 10pt;"&gt;=&lt;SPAN style="color: #0000ff;"&gt;If&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;MonthName&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Date&lt;/SPAN&gt;)='$(vMonth2)',&lt;SPAN style="color: #800000;"&gt;Date&lt;/SPAN&gt;,&lt;SPAN style="color: #0000ff;"&gt;null&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;()) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;But it falls over as soon as a selection is made in another dimension (let's say for 'Sales') where there are no corresponding data points for the last few days of the month. The date dimension ends at, for example, 24 May, not 31 May.&lt;/P&gt;&lt;P&gt;If I instruct the chart expression (=&lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Sales&lt;/SPAN&gt;)) to allow null values, the line goes bonkers because it then includes Sales for all dates of the previous month (April).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So ... I stand to be corrected, but have decided I probably need to include an &lt;SPAN style="color: #0000ff;"&gt;aggr&lt;/SPAN&gt;() function in my calculated dimension, and somehow instruct it to step through all dates belonging to the complete set of dates applicable to May 2016.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I cannot get the syntax correct. Can any of you give me an idea of what that should look like, or otherwise suggest a way around the problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pete&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2016 23:11:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension-Giving-Days-in-a-Month/m-p/1155853#M377131</guid>
      <dc:creator>peter_burgess</dc:creator>
      <dc:date>2016-05-26T23:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Dimension Giving Days in a Month</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension-Giving-Days-in-a-Month/m-p/1155854#M377132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would it be possible to look at the issue? Essentially if you can provide a sample, we might be able to help you in much better way&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2016 16:15:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension-Giving-Days-in-a-Month/m-p/1155854#M377132</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-27T16:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Dimension Giving Days in a Month</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension-Giving-Days-in-a-Month/m-p/1155855#M377133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to ignore other dimension selection,&amp;nbsp; may be you can try to use the set expression with your ignoring fields.. like&lt;/P&gt;&lt;P&gt;=sum ({&amp;lt;Year,Date,Sales&amp;gt;}Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2016 16:29:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension-Giving-Days-in-a-Month/m-p/1155855#M377133</guid>
      <dc:creator>settu_periasamy</dc:creator>
      <dc:date>2016-05-27T16:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Dimension Giving Days in a Month</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension-Giving-Days-in-a-Month/m-p/1155856#M377134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunny and Settu.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Settu has put me on the right track. I have incorporated the set selection of all possible Dates in my expressions for my measures, and by leaving the calculated dimension as it is have achieved the result I require.&lt;/P&gt;&lt;P&gt;In simplified form, the expression for Sales now looks like this: =&lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;({1 &amp;lt;&lt;SPAN style="color: #800000;"&gt;Date&lt;/SPAN&gt;=&amp;gt;} &lt;SPAN style="color: #800000;"&gt;Sales&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe I can tweak the calculations for Dimension and Measures a bit more so they become a little more robust, but now I am much more confident of achieving the final desired outcome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pete&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 May 2016 04:49:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension-Giving-Days-in-a-Month/m-p/1155856#M377134</guid>
      <dc:creator>peter_burgess</dc:creator>
      <dc:date>2016-05-29T04:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Dimension Giving Days in a Month</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension-Giving-Days-in-a-Month/m-p/1155857#M377135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't understand the point of using &lt;STRONG&gt;1&lt;/STRONG&gt; and &lt;STRONG&gt;&amp;lt;Date = &amp;gt;&lt;/STRONG&gt; at the same time? Are you looking to ignore all selections or just selection in Date field? If you want to ignore all selections use this -&amp;gt; &lt;STRONG&gt;Sum({1} Sales)&lt;/STRONG&gt; and if you are looking to ignore selections in just Date use this -&amp;gt; &lt;STRONG&gt;Sum({&amp;lt;Date = &amp;gt;}Sales)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 May 2016 06:00:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension-Giving-Days-in-a-Month/m-p/1155857#M377135</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-29T06:00:28Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Dimension Giving Days in a Month</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension-Giving-Days-in-a-Month/m-p/1155858#M377136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunny –&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have data coming in from Sales as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date                      Sales (Channel 1, cumulative)&lt;/P&gt;&lt;P&gt;01/05/16              0&lt;/P&gt;&lt;P&gt;02/05/16              85&lt;/P&gt;&lt;P&gt;03/05/16              125&lt;/P&gt;&lt;P&gt;04/05/16              150&lt;/P&gt;&lt;P&gt;05/05/16              190&lt;/P&gt;&lt;P&gt;06/05/16              255&lt;/P&gt;&lt;P&gt;07/05/16              255&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note this is a simplified table – there are actually several columns comprising data from different Channels.&lt;/P&gt;&lt;P&gt;But the table as received only includes data up to the current date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a separate Dates table that displays all dates, from 01/04/16 through to 31/05/16&lt;/P&gt;&lt;P&gt;Date&lt;/P&gt;&lt;P&gt;01/04/16&lt;/P&gt;&lt;P&gt;02/04/16&lt;/P&gt;&lt;P&gt;03/04/16&lt;/P&gt;&lt;P&gt;04/04/16&lt;/P&gt;&lt;P&gt;   .   .   .&lt;/P&gt;&lt;P&gt;   .   .   .&lt;/P&gt;&lt;P&gt;01/05/16&lt;/P&gt;&lt;P&gt;02/05/16&lt;/P&gt;&lt;P&gt;03/05/16&lt;/P&gt;&lt;P&gt;   .   .   .&lt;/P&gt;&lt;P&gt;   .   .   .&lt;/P&gt;&lt;P&gt;30/05/16&lt;/P&gt;&lt;P&gt;31/05/16&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my QV document, the user makes a selection on Sales Channel, this automatically associates Dates with it.&lt;/P&gt;&lt;P&gt;If I use just the  sum({&amp;lt;Date=&amp;gt;} Sales  expression, the Dates are still limited to 01/05/16 through 07/05/16.&lt;/P&gt;&lt;P&gt;If I use the sum({1 &amp;lt;Date=&amp;gt;} Sales expression, I include ALL possible Dates. Because I have a calculated Dimension that specifies the dates for the full month of May, the displayed Dates are limited to just May, which is what I want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                                      &lt;/P&gt;&lt;P&gt;                Fig 1 – using modifier {&amp;lt;Date=&amp;gt;}                                                                                Fig 2 – using modifier {1 &amp;lt;Date=&amp;gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps explain my rationale.&lt;/P&gt;&lt;P&gt;I guess I could have worked out a better data model, but at the time it satisfied the purpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pete&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 May 2016 23:31:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension-Giving-Days-in-a-Month/m-p/1155858#M377136</guid>
      <dc:creator>peter_burgess</dc:creator>
      <dc:date>2016-05-29T23:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Dimension Giving Days in a Month</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension-Giving-Days-in-a-Month/m-p/1155859#M377137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all.&lt;/P&gt;&lt;P&gt;I see that the graphs I had included in my last post didn't make it through. I reproduce them below. Figure 1 is the result of using the modifier {&amp;lt;Date=&amp;gt;}, Figure 2 is using {1 &amp;lt;Date=&amp;gt;}.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Figure1.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/126160_Figure1.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Figure 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Figure2.JPG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/126161_Figure2.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Figure 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pete&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2016 01:21:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension-Giving-Days-in-a-Month/m-p/1155859#M377137</guid>
      <dc:creator>peter_burgess</dc:creator>
      <dc:date>2016-05-30T01:21:47Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Dimension Giving Days in a Month</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension-Giving-Days-in-a-Month/m-p/1155860#M377138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is your calculated dimension look like? Curious to see how that looks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2016 09:45:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension-Giving-Days-in-a-Month/m-p/1155860#M377138</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-30T09:45:48Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Dimension Giving Days in a Month</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension-Giving-Days-in-a-Month/m-p/1155861#M377139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunny -&lt;/P&gt;&lt;P&gt;As mentioned in my first post, the calculated dim is: &lt;SPAN style="font-size: 10pt;"&gt;=&lt;SPAN style="color: #0000ff;"&gt;If&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;MonthName&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Date&lt;/SPAN&gt;)='$(vMonth2)',&lt;SPAN style="color: #800000;"&gt;Date&lt;/SPAN&gt;,&lt;SPAN style="color: #0000ff;"&gt;null&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;()).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Where vMonth2 is a variable, in this case assigned with 'May 2016'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;P.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2016 20:46:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension-Giving-Days-in-a-Month/m-p/1155861#M377139</guid>
      <dc:creator>peter_burgess</dc:creator>
      <dc:date>2016-05-30T20:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Dimension Giving Days in a Month</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension-Giving-Days-in-a-Month/m-p/1155862#M377140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about this then?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum({&amp;lt;[Sales Channel]&amp;gt;} Sales)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum({&amp;lt;[Sales Channel], Date&amp;gt;} Sales)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;UPDATE:&lt;/STRONG&gt; The only reason I am not satisfied with using &lt;STRONG&gt;Sum({1&amp;lt;Date&amp;gt;} Sales)&lt;/STRONG&gt; is because it looks redundant to use Date if you are already using 1 in your set analysis. 1 restrict any selection and hence date if probably not needed. But in your case you seems to want to avoid selection in Sales Channel and may be Date.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2016 21:57:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension-Giving-Days-in-a-Month/m-p/1155862#M377140</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-30T21:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Dimension Giving Days in a Month</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-Dimension-Giving-Days-in-a-Month/m-p/1155863#M377141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunny –&lt;/P&gt;&lt;P&gt;Thanks. I have decided to re-design my data model, and will look at your suggestion once I have completed the transformation.&lt;/P&gt;&lt;P&gt;I will advise the Community if and when I reach a satisfactory outcome.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pete&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2016 01:12:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-Dimension-Giving-Days-in-a-Month/m-p/1155863#M377141</guid>
      <dc:creator>peter_burgess</dc:creator>
      <dc:date>2016-06-03T01:12:36Z</dc:date>
    </item>
  </channel>
</rss>

