<?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: Variable value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variable-value/m-p/652757#M238629</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load Count(distinct(id)&amp;nbsp; as flag;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;sql select * from demo;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LET vCount = peek('flag');&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;But you don't need to do it this way. Qlikview keeps track of distinct values of its internal tables and there are (very fast) functions to use such information:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sql select * from demo; // this assumes you load a field called id.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LET vCount = fieldvaluecount('id'); // get the number of distinct values from Qlikviews internal field tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Jun 2014 14:38:25 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2014-06-25T14:38:25Z</dc:date>
    <item>
      <title>Variable value</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-value/m-p/652756#M238628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the backend scripting, I would like to get count of distinct id into a variable. Can some one help me in getting it?&lt;/P&gt;&lt;P&gt;Eg:&lt;/P&gt;&lt;P&gt;Load Count(distinct(id)&amp;nbsp; as flag;&lt;/P&gt;&lt;P&gt;sql select * from demo;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Till here every thing is fine.&lt;/P&gt;&lt;P&gt;No I need to save the flag values in a variable&lt;/P&gt;&lt;P&gt;Request to assist&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2014 14:21:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-value/m-p/652756#M238628</guid>
      <dc:creator>gouthamkk</dc:creator>
      <dc:date>2014-06-25T14:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: Variable value</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-value/m-p/652757#M238629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load Count(distinct(id)&amp;nbsp; as flag;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;sql select * from demo;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LET vCount = peek('flag');&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;But you don't need to do it this way. Qlikview keeps track of distinct values of its internal tables and there are (very fast) functions to use such information:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sql select * from demo; // this assumes you load a field called id.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LET vCount = fieldvaluecount('id'); // get the number of distinct values from Qlikviews internal field tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2014 14:38:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-value/m-p/652757#M238629</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-06-25T14:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: Variable value</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-value/m-p/652758#M238630</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 a lot for the additional input. I think I will go with your second thought on Internal tables. Both the logics works fine and are giving same results&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jun 2014 14:52:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-value/m-p/652758#M238630</guid>
      <dc:creator>gouthamkk</dc:creator>
      <dc:date>2014-06-25T14:52:57Z</dc:date>
    </item>
  </channel>
</rss>

