<?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: Problem with creating expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-creating-expression/m-p/638898#M1088315</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #800000; font-size: 8pt;"&gt;location&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;amp;'|'&amp;amp;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #800000; font-size: 8pt;"&gt;place_type&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Jun 2014 10:30:49 GMT</pubDate>
    <dc:creator>nagaiank</dc:creator>
    <dc:date>2014-06-04T10:30:49Z</dc:date>
    <item>
      <title>Problem with creating expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-creating-expression/m-p/638896#M1088313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have a problem with creating correct expression to my case : I have a table like this :&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;location&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;place_type&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;C&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;D&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;D&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;E&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to calculate how many different location do i have like tihs : &lt;BR /&gt;row1 - A 1 , and row2 - A 2 is counted as 1 because location and place_type are the same&lt;/P&gt;&lt;P&gt;then in row5 and row6 i have D 1 and D 2 which are different so i have to count this as a 2 &lt;BR /&gt;In this example the result should be 6&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried do some Count(Distinct... but it ignore the fact that row1 and row2 are the same and count it as a 2 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im beginner in QlikView so any help would be amazing &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2014 10:21:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-creating-expression/m-p/638896#M1088313</guid>
      <dc:creator />
      <dc:date>2014-06-04T10:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with creating expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-creating-expression/m-p/638897#M1088314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=Count( Distinct location &amp;amp; place_type)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2014 10:29:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-creating-expression/m-p/638897#M1088314</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-06-04T10:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with creating expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-creating-expression/m-p/638898#M1088315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #800000; font-size: 8pt;"&gt;location&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;amp;'|'&amp;amp;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #800000; font-size: 8pt;"&gt;place_type&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2014 10:30:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-creating-expression/m-p/638898#M1088315</guid>
      <dc:creator>nagaiank</dc:creator>
      <dc:date>2014-06-04T10:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with creating expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-creating-expression/m-p/638899#M1088316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;or at script level try adding&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14018792352085034" jivemacro_uid="_14018792352085034"&gt;
&lt;P&gt;AutoNumberHash128(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;location, place_type) as LocationPlaceTypeID&lt;/SPAN&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in your LOAD statement to create a distinct ID for each combination of location and place_type.&lt;/P&gt;&lt;P&gt;In the visualization you then would use an expression like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14018792293396780" jivemacro_uid="_14018792293396780"&gt;
&lt;P&gt;Count(Distinct &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;LocationPlaceTypeID&lt;/SPAN&gt;)&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Depending on the size of your tables this might also improve your application's performance because the string calculations are done during load time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2014 10:52:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-creating-expression/m-p/638899#M1088316</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-06-04T10:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with creating expression</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-creating-expression/m-p/638900#M1088317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jakub,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a dummy field (key field) of combination of location &amp;amp; place_type.&lt;/P&gt;&lt;P&gt;and take distinct count of that new field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In script -&lt;BR /&gt;location&amp;amp;place_type as key&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in front end -&lt;/P&gt;&lt;P&gt;count(distinct key)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you will get the result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lalit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2014 12:04:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-creating-expression/m-p/638900#M1088317</guid>
      <dc:creator />
      <dc:date>2014-06-04T12:04:59Z</dc:date>
    </item>
  </channel>
</rss>

