<?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: Distinct values from different columns in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Distinct-values-from-different-columns/m-p/554897#M207293</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;just try the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;expression 1: &lt;/P&gt;&lt;P&gt;Conditional: = GetSelectedCount(ZoneId)=1 &lt;/P&gt;&lt;P&gt;Definitional: = sum( DISTINCT TZone) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;expression 2: &lt;/P&gt;&lt;P&gt;Conditional: = GetSelectedCount(regionid)=1 &lt;/P&gt;&lt;P&gt;Definitional: = sum( DISTINCT TRegion ) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Jan 2014 07:35:02 GMT</pubDate>
    <dc:creator>sureshbaabu</dc:creator>
    <dc:date>2014-01-06T07:35:02Z</dc:date>
    <item>
      <title>Distinct values from different columns</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-values-from-different-columns/m-p/554890#M207286</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;I have a table in database like this&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 512px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" width="64"&gt;ZoneId&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="64"&gt;regionid&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="64"&gt;districtid&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="64"&gt;territoryid&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="64"&gt;TTerritory&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="64"&gt;TDistrict&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="64"&gt;TRegion&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="64"&gt;TZone&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="20"&gt;52&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-left: none;"&gt;1207&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-left: none;"&gt;104&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-left: none;"&gt;133&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-left: none;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-left: none;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-left: none;"&gt;215550&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-left: none;"&gt;475879&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="20" style="border-top: none;"&gt;52&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;61&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;114&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;134&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;7182&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;172362&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;475879&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="20" style="border-top: none;"&gt;52&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;61&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;102&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;134&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;172362&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;475879&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="20" style="border-top: none;"&gt;1206&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;66&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;122&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;240&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;29560&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;233082&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;247206&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="20" style="border-top: none;"&gt;1206&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;66&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;92&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;136&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;34129&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;233082&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;247206&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="20" style="border-top: none;"&gt;1206&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;66&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;92&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;136&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;34129&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;233082&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;247206&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="20" style="border-top: none;"&gt;1206&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;66&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;92&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;136&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;34129&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;233082&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;&lt;P&gt;247206&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;i have 4 list boxes Zone,Region,District and Territory in my dashboard,if i will select Zone in the list box the distinct value will display in the pivot table from TZone column in the database.&lt;/P&gt;&lt;P&gt;Like this if i will select Region in the list box,the distinct value will display from TRegion column in the database and so on....&lt;/P&gt;&lt;P&gt;I wrote the expression in pivot table like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=(if(GetFieldSelections(Zone)&amp;gt;=1,sum(distinct{$&amp;lt;flag={'mrktshare'},CommonYear={$(VmaxYear-1)},CommonMonthNo={$(VmaxMonth)}&amp;gt;}TZone),&lt;/P&gt;&lt;P&gt;if(GetFieldSelections(Region)&amp;gt;=1,sum(DISTINCT{$&amp;lt;flag={'mrktshare'},CommonYear={$(VmaxYear-1)},CommonMonthNo={$(VmaxMonth)}&amp;gt;}TRegion),&lt;/P&gt;&lt;P&gt;if(GetFieldSelections(District)&amp;gt;=1,sum(DISTINCT{$&amp;lt;flag={'mrktshare'},CommonYear={$(VmaxYear-1)},CommonMonthNo={$(VmaxMonth)}&amp;gt;}TDistrict),&lt;/P&gt;&lt;P&gt;if(GetFieldSelections(Territory)&amp;gt;=1,sum(DISTINCT{&amp;lt;flag={'mrktshare'},CommonYear={$(VmaxYear-1)},CommonMonthNo={$(VmaxMonth)}&amp;gt;}TTerritory),1&lt;/P&gt;&lt;P&gt;)))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is working for Zone selection after i will select Region still it is showing Zone Value,if i will deselect the Zone it is showing Region Value.&lt;/P&gt;&lt;P&gt;How can i achieve this in QlikView based on selections in the list box calling the distinct values in different columns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am struggling past from 4 days,can some one guide me in this how to achieve this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;baru&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jan 2014 05:34:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-values-from-different-columns/m-p/554890#M207286</guid>
      <dc:creator />
      <dc:date>2014-01-06T05:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct values from different columns</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-values-from-different-columns/m-p/554891#M207287</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;&lt;/P&gt;&lt;P&gt;Can some one help me in this........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;baru&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jan 2014 06:14:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-values-from-different-columns/m-p/554891#M207287</guid>
      <dc:creator />
      <dc:date>2014-01-06T06:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct values from different columns</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-values-from-different-columns/m-p/554892#M207288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Can you try creating multiple expressions(one for each) and display the appropriate based on 'Conditional' option&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jan 2014 07:17:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-values-from-different-columns/m-p/554892#M207288</guid>
      <dc:creator>sureshbaabu</dc:creator>
      <dc:date>2014-01-06T07:17:15Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct values from different columns</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-values-from-different-columns/m-p/554893#M207289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In a first look, GetFieldSelections() returns a string, I guess you have to use getselectedcount() instead.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jan 2014 07:18:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-values-from-different-columns/m-p/554893#M207289</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-01-06T07:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct values from different columns</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-values-from-different-columns/m-p/554894#M207290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi tresesco,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your reply,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried getselectedcount() also, but it's not working.can i have some alternate way to do this...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jan 2014 07:30:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-values-from-different-columns/m-p/554894#M207290</guid>
      <dc:creator />
      <dc:date>2014-01-06T07:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct values from different columns</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-values-from-different-columns/m-p/554895#M207291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Suresh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have 8 conditions form 8 tables,so i looking to do this in one expression .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jan 2014 07:32:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-values-from-different-columns/m-p/554895#M207291</guid>
      <dc:creator />
      <dc:date>2014-01-06T07:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct values from different columns</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-values-from-different-columns/m-p/554896#M207292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you post a sample app that demonstrates the issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jan 2014 07:33:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-values-from-different-columns/m-p/554896#M207292</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-01-06T07:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct values from different columns</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-values-from-different-columns/m-p/554897#M207293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;just try the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;expression 1: &lt;/P&gt;&lt;P&gt;Conditional: = GetSelectedCount(ZoneId)=1 &lt;/P&gt;&lt;P&gt;Definitional: = sum( DISTINCT TZone) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;expression 2: &lt;/P&gt;&lt;P&gt;Conditional: = GetSelectedCount(regionid)=1 &lt;/P&gt;&lt;P&gt;Definitional: = sum( DISTINCT TRegion ) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jan 2014 07:35:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-values-from-different-columns/m-p/554897#M207293</guid>
      <dc:creator>sureshbaabu</dc:creator>
      <dc:date>2014-01-06T07:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct values from different columns</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-values-from-different-columns/m-p/554898#M207294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tresesco,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;getselectedcount() is working but we need to pass this in every condition.so that it will work...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jan 2014 07:55:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-values-from-different-columns/m-p/554898#M207294</guid>
      <dc:creator />
      <dc:date>2014-01-06T07:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct values from different columns</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-values-from-different-columns/m-p/554899#M207295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Can you please share your qvw with some sample data.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jan 2014 08:24:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-values-from-different-columns/m-p/554899#M207295</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-06T08:24:52Z</dc:date>
    </item>
  </channel>
</rss>

