<?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 count distinct lastyear in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/count-distinct-lastyear/m-p/146283#M24874</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;use macro&lt;/P&gt;&lt;P&gt;sub getselectedfield&lt;BR /&gt;set doc = ActiveDocument&lt;BR /&gt;set mySelections = doc.fields("Year").GetSelectedValues&lt;BR /&gt;for i = 0 to mySelections.Count - 1&lt;BR /&gt; set v = ActiveDocument.Variables("Variable1")&lt;BR /&gt; v.SetContent mySelections.Item(i).text,true&lt;BR /&gt; 'v.SetContent mySelections.Item.text,true&lt;BR /&gt;next&lt;/P&gt;&lt;P&gt;End sub&lt;/P&gt;&lt;P&gt;Pass this variable in expression.&lt;/P&gt;&lt;P&gt;Example if u select year 2008 variable1 = 2008 so u put in expression Variable1 - 1&lt;/P&gt;&lt;P&gt;I hope it ll help for u.&lt;/P&gt;&lt;P&gt;-Sathish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Jun 2009 18:38:43 GMT</pubDate>
    <dc:creator>sathishkumar_go</dc:creator>
    <dc:date>2009-06-09T18:38:43Z</dc:date>
    <item>
      <title>count distinct lastyear</title>
      <link>https://community.qlik.com/t5/QlikView/count-distinct-lastyear/m-p/146282#M24873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;I have a problem during key linking between our data.&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="margin: auto auto auto 23.15pt; border-collapse: collapse; mso-table-layout-alt: fixed; mso-padding-alt: 0cm 3.5pt 0cm 3.5pt;"&gt;&lt;TBODY&gt;&lt;TR style="height: 15.75pt; mso-yfti-irow: 0; mso-yfti-firstrow: yes;"&gt;&lt;TD style="border-right: windowtext 1pt solid; padding-right: 3.5pt; border-top: windowtext 1pt solid; padding-left: 3.5pt; padding-bottom: 0cm; border-left: windowtext 1pt solid; width: 149pt; padding-top: 0cm; border-bottom: #d4d0c8; height: 15.75pt; background-color: transparent;" valign="bottom" width="199"&gt;&lt;P style="margin: 0cm 0cm 0pt; mso-layout-grid-align: none; text-align: center"&gt;&lt;B&gt;Billing&lt;/B&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-right: windowtext 1pt solid; padding-right: 3.5pt; border-top: windowtext 1pt solid; padding-left: 3.5pt; padding-bottom: 0cm; border-left: #d4d0c8; width: 149pt; padding-top: 0cm; border-bottom: #d4d0c8; height: 15.75pt; background-color: transparent;" valign="bottom" width="199"&gt;&lt;P style="font-weight: bold; margin: 0cm 0cm 0pt; mso-layout-grid-align: none; text-align: center"&gt;Order&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt; mso-yfti-irow: 1;"&gt;&lt;TD style="border-right: windowtext 1pt solid; padding-right: 3.5pt; border-top: #d4d0c8; padding-left: 3.5pt; padding-bottom: 0cm; border-left: windowtext 1pt solid; width: 149pt; padding-top: 0cm; border-bottom: #d4d0c8; height: 12.75pt; background-color: transparent;" valign="bottom" width="199"&gt;&lt;P&gt;SalesDoc_ID&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-right: windowtext 1pt solid; padding-right: 3.5pt; border-top: #d4d0c8; padding-left: 3.5pt; padding-bottom: 0cm; border-left: #d4d0c8; width: 149pt; padding-top: 0cm; border-bottom: #d4d0c8; height: 12.75pt; background-color: transparent;" valign="bottom" width="199"&gt;&lt;P&gt;%SalesDoc_ID&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt; mso-yfti-irow: 2;"&gt;&lt;TD style="border-right: windowtext 1pt solid; padding-right: 3.5pt; border-top: #d4d0c8; padding-left: 3.5pt; padding-bottom: 0cm; border-left: windowtext 1pt solid; width: 149pt; padding-top: 0cm; border-bottom: #d4d0c8; height: 12.75pt; background-color: transparent;" valign="bottom" width="199"&gt;&lt;P&gt;Billing$.Billing_Type&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-right: windowtext 1pt solid; padding-right: 3.5pt; border-top: #d4d0c8; padding-left: 3.5pt; padding-bottom: 0cm; border-left: #d4d0c8; width: 149pt; padding-top: 0cm; border-bottom: #d4d0c8; height: 12.75pt; background-color: transparent;" valign="bottom" width="199"&gt;&lt;P&gt;Order$.Document_Created_Dat&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt; mso-yfti-irow: 3;"&gt;&lt;TD style="border-right: windowtext 1pt solid; padding-right: 3.5pt; border-top: #d4d0c8; padding-left: 3.5pt; padding-bottom: 0cm; border-left: windowtext 1pt solid; width: 149pt; padding-top: 0cm; border-bottom: #d4d0c8; height: 12.75pt; background-color: transparent;" valign="bottom" width="199"&gt;&lt;P&gt;Created_On&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-right: windowtext 1pt solid; padding-right: 3.5pt; border-top: #d4d0c8; padding-left: 3.5pt; padding-bottom: 0cm; border-left: #d4d0c8; width: 149pt; padding-top: 0cm; border-bottom: #d4d0c8; height: 12.75pt; background-color: transparent;" valign="bottom" width="199"&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 13.5pt; mso-yfti-irow: 4; mso-yfti-lastrow: yes;"&gt;&lt;TD style="border-right: windowtext 1pt solid; padding-right: 3.5pt; border-top: #d4d0c8; padding-left: 3.5pt; padding-bottom: 0cm; border-left: windowtext 1pt solid; width: 149pt; padding-top: 0cm; border-bottom: windowtext 1pt solid; height: 13.5pt; background-color: transparent;" valign="bottom" width="199"&gt;&lt;P&gt;Net_Value_Inv&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-right: windowtext 1pt solid; padding-right: 3.5pt; border-top: #d4d0c8; padding-left: 3.5pt; padding-bottom: 0cm; border-left: #d4d0c8; width: 149pt; padding-top: 0cm; border-bottom: windowtext 1pt solid; height: 13.5pt; background-color: transparent;" valign="bottom" width="199"&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;I would like the following&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;B&gt;Billing&lt;/B&gt; :&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;1)Sum of (Net_Value_Inv with the Created_On = calendar date (calendar) it is correctly.&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;Order:&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;2) Number of the %SalesDoc_ID (distinct) with the following restriction:&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P&gt;2.1) &lt;B&gt;SalesDoc_ID&lt;/B&gt; = %SalesDoc_ID&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;2.2 ) &lt;B&gt;Billing$.Billing_Type&lt;/B&gt;='Z2','ZBV','ZCR1','ZEX','ZS1' is stored under BM04.&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;2.3 ) &lt;B&gt;Order$.Document_Created_Dat&lt;/B&gt; = &lt;B&gt;Kalender-Datum&lt;/B&gt; = &lt;B&gt;Created_On&lt;/B&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;/P&gt;&lt;P&gt;count (distinct {$&amp;lt;Kalender.Kalender.Jahr={$(=Only(Kalender.Kalender.Jahr))}&amp;gt;}{$*BM04} if(Order$.Document_Created_Dat = Created_On ,%SalesDoc_ID))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I connected and am provided the field Order$.Document_Created_Dat with the calendars $Syn to 1 Table. Therefore I compare in the formula whether date of order = date from Billing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only I have the problem with the calendar of Last Year.Like. how can i COUNT formula with 1 year back. (Order$.Document_Created_Dat -1) and (Created_On -1)?&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt;"&gt;attache QlikView&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2009 15:44:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-distinct-lastyear/m-p/146282#M24873</guid>
      <dc:creator />
      <dc:date>2009-06-09T15:44:25Z</dc:date>
    </item>
    <item>
      <title>count distinct lastyear</title>
      <link>https://community.qlik.com/t5/QlikView/count-distinct-lastyear/m-p/146283#M24874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;use macro&lt;/P&gt;&lt;P&gt;sub getselectedfield&lt;BR /&gt;set doc = ActiveDocument&lt;BR /&gt;set mySelections = doc.fields("Year").GetSelectedValues&lt;BR /&gt;for i = 0 to mySelections.Count - 1&lt;BR /&gt; set v = ActiveDocument.Variables("Variable1")&lt;BR /&gt; v.SetContent mySelections.Item(i).text,true&lt;BR /&gt; 'v.SetContent mySelections.Item.text,true&lt;BR /&gt;next&lt;/P&gt;&lt;P&gt;End sub&lt;/P&gt;&lt;P&gt;Pass this variable in expression.&lt;/P&gt;&lt;P&gt;Example if u select year 2008 variable1 = 2008 so u put in expression Variable1 - 1&lt;/P&gt;&lt;P&gt;I hope it ll help for u.&lt;/P&gt;&lt;P&gt;-Sathish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2009 18:38:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-distinct-lastyear/m-p/146283#M24874</guid>
      <dc:creator>sathishkumar_go</dc:creator>
      <dc:date>2009-06-09T18:38:43Z</dc:date>
    </item>
    <item>
      <title>count distinct lastyear</title>
      <link>https://community.qlik.com/t5/QlikView/count-distinct-lastyear/m-p/146284#M24875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;Thanks, for you Help.&lt;/P&gt;&lt;P&gt;I am working with Qlikview sine 2 months and I don't have any experience with Marko. Do you have any QVW .example for your Marko's? I copied it in my QlikView and don't change any field.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Shideh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2009 19:35:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-distinct-lastyear/m-p/146284#M24875</guid>
      <dc:creator />
      <dc:date>2009-06-09T19:35:01Z</dc:date>
    </item>
    <item>
      <title>count distinct lastyear</title>
      <link>https://community.qlik.com/t5/QlikView/count-distinct-lastyear/m-p/146285#M24876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Un fortunately i don't have any example for macro. Otherwise i ll do 1 thing u attach 1 application. can i write the macro for that app and send to u.Otherwise attach ur application i ll try my level best.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Sathish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2009 20:37:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-distinct-lastyear/m-p/146285#M24876</guid>
      <dc:creator>sathishkumar_go</dc:creator>
      <dc:date>2009-06-09T20:37:33Z</dc:date>
    </item>
    <item>
      <title>count distinct lastyear</title>
      <link>https://community.qlik.com/t5/QlikView/count-distinct-lastyear/m-p/146286#M24877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have modified the application you sent.&lt;/P&gt;&lt;P&gt;Is it what you need ?&lt;/P&gt;&lt;P&gt;The explanation is in the application in the text box on the right&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Philippe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2009 20:55:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-distinct-lastyear/m-p/146286#M24877</guid>
      <dc:creator />
      <dc:date>2009-06-09T20:55:48Z</dc:date>
    </item>
    <item>
      <title>count distinct lastyear</title>
      <link>https://community.qlik.com/t5/QlikView/count-distinct-lastyear/m-p/146287#M24878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Philippe,&lt;/P&gt;&lt;P&gt;Thanks. It is exact what I want.&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;Shideh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2009 21:09:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-distinct-lastyear/m-p/146287#M24878</guid>
      <dc:creator />
      <dc:date>2009-06-09T21:09:07Z</dc:date>
    </item>
  </channel>
</rss>

