<?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: Default Select Values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Default-Select-Values/m-p/265607#M99829</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry,&lt;/P&gt;&lt;P&gt;i've forgotten the attach... &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/silly.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Sep 2011 07:07:01 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-09-19T07:07:01Z</dc:date>
    <item>
      <title>Default Select Values</title>
      <link>https://community.qlik.com/t5/QlikView/Default-Select-Values/m-p/265599#M99821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi there - im relatively new to qlikview and wanted to know if it&amp;nbsp; was possible to have data in a straight table filter by a date set in a slider... my report has got columns for Year2Date, Month2Date and AllDates. So if the user selects the date on slider to be 2011/07/25, then the full report will update according to the formula:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AllDates: SUM(SalesAmount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Month2Date: SUM(IF(YEAR = Year(vDateOnSlider), IF(MONTH = Month(vDateOnSlider), SalesAmount)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Year2Date: SUM(IF(YEAR = Year(vDateOnSlider), SalesAmount))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What i found was that if I dont have the YEAR and MONTH as 'Select Fields' on my screen, the data does not show on my table...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this makes sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Sep 2011 13:30:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Default-Select-Values/m-p/265599#M99821</guid>
      <dc:creator />
      <dc:date>2011-09-15T13:30:19Z</dc:date>
    </item>
    <item>
      <title>Default Select Values</title>
      <link>https://community.qlik.com/t5/QlikView/Default-Select-Values/m-p/265600#M99822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; try with this set analysis&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MTD &lt;/STRONG&gt;= Sum ({$&amp;lt;#_Date_NUM_KEY = {"&amp;lt;=$(=Max(#_Date_NUM_KEY))"},Month_Num = {'$(=Num(Month((Max(Date)))))'},Year = {'$(=Num(Year((Max(Date)))))'},Date=&amp;gt;}M_STORE_SALES_AMT_CY)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;YTD&lt;/STRONG&gt; = Sum ({$&amp;lt;#_Date_NUM_KEY = {"&amp;lt;=$(=Max(#_Date_NUM_KEY))"},Year = {'$(=Num(Year((Max(Date)))))'},Date=&amp;gt;}M_STORE_SALES_AMT_CY))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For these Expression you need to create a Date in Number Format using this Functaion &lt;STRONG&gt;"Num(DateField)" and &lt;/STRONG&gt;Month also in Number format &lt;STRONG&gt;"Num(Month(DateField))"&lt;/STRONG&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Sep 2011 13:36:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Default-Select-Values/m-p/265600#M99822</guid>
      <dc:creator />
      <dc:date>2011-09-15T13:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: Default Select Values</title>
      <link>https://community.qlik.com/t5/QlikView/Default-Select-Values/m-p/265601#M99823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for the reply santhugsk, but this is quite advanced. Would you be able to assist with an example using my variables below?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I have noticed is the slider is actaully a value i convert into a date later on... not sure if that helps?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Year the sale was made in = 'YEAR'&lt;/P&gt;&lt;P&gt;Sales Amount = 'SALES'&lt;/P&gt;&lt;P&gt;Number from Slider = 'vReportDateSlider'&lt;BR /&gt;Date(vReportDateSlider) = 'vReportDate'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My calculation is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;IF(YEAR = Year($(vReportDate)),sum(Amount))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Sep 2011 05:54:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Default-Select-Values/m-p/265601#M99823</guid>
      <dc:creator />
      <dc:date>2011-09-16T05:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: Default Select Values</title>
      <link>https://community.qlik.com/t5/QlikView/Default-Select-Values/m-p/265602#M99824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;try this little example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C u,&lt;/P&gt;&lt;P&gt;Stefano.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Sep 2011 14:49:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Default-Select-Values/m-p/265602#M99824</guid>
      <dc:creator />
      <dc:date>2011-09-17T14:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: Default Select Values</title>
      <link>https://community.qlik.com/t5/QlikView/Default-Select-Values/m-p/265603#M99825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;which example Ste.San?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried this (but returned nothing):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum( {1&amp;lt;YEAR= { vReportDate} &amp;gt;} SALES)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code looked like it didnt 'like' vReportDate... I changed it to 2011 and that worked... but i cant define it as 2011, it has to be selectable&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Sep 2011 17:04:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Default-Select-Values/m-p/265603#M99825</guid>
      <dc:creator />
      <dc:date>2011-09-18T17:04:37Z</dc:date>
    </item>
    <item>
      <title>Default Select Values</title>
      <link>https://community.qlik.com/t5/QlikView/Default-Select-Values/m-p/265604#M99826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Ok, I found this one forum that guided me, but still never came right:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It accepts the following code, but returns nothing:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt; YEAR = {$(vReportDateYear)} &amp;gt;} SALES)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(i declared a variable "vReportDateYear" which equals "Year(vReportDate)")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would this have anything to do with what santhugsk mentioned above:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;For these Expression you need to create a Date in Number Format using this Functaion "Num(DateField)" and Month also in Number format "Num(Month(DateField))"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Sep 2011 05:47:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Default-Select-Values/m-p/265604#M99826</guid>
      <dc:creator />
      <dc:date>2011-09-19T05:47:40Z</dc:date>
    </item>
    <item>
      <title>Default Select Values</title>
      <link>https://community.qlik.com/t5/QlikView/Default-Select-Values/m-p/265605#M99827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Ok - I came right:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt; YEAR = {$(vReportDateYear)} &amp;gt;} SALES)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I changed my variable to "=Year(ReportDate)" (the equals sign was needed before the "YEAR...")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to include an "AND" clause? I.E. to say i want SALES for YEAR = vReportDateYear AND MONTH = vReportDateMonth ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for the helpo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Sep 2011 06:14:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Default-Select-Values/m-p/265605#M99827</guid>
      <dc:creator />
      <dc:date>2011-09-19T06:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: Default Select Values</title>
      <link>https://community.qlik.com/t5/QlikView/Default-Select-Values/m-p/265606#M99828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;got it:&lt;/P&gt;&lt;P&gt;Sum({&amp;lt; YEAR = {$(vReportDateYear)} , MONTH = {$(vReportDateMonth)}&amp;nbsp; &amp;gt;} SALES)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Sep 2011 06:34:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Default-Select-Values/m-p/265606#M99828</guid>
      <dc:creator />
      <dc:date>2011-09-19T06:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: Default Select Values</title>
      <link>https://community.qlik.com/t5/QlikView/Default-Select-Values/m-p/265607#M99829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry,&lt;/P&gt;&lt;P&gt;i've forgotten the attach... &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/silly.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Sep 2011 07:07:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Default-Select-Values/m-p/265607#M99829</guid>
      <dc:creator />
      <dc:date>2011-09-19T07:07:01Z</dc:date>
    </item>
  </channel>
</rss>

