<?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 Dimension with calculated column in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Distinct-Dimension-with-calculated-column/m-p/1620544#M445743</link>
    <description>&lt;P&gt;What other dimensions do you have in your chart... do any of those dimensions have different value for&amp;nbsp;&lt;SPAN&gt;93451 &amp;amp; 98735? Dimensions will always show unique values based on the combination of dimensions you have... if all the dimensions have the same value, they should not repeat....&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Sep 2019 12:37:23 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2019-09-05T12:37:23Z</dc:date>
    <item>
      <title>Distinct Dimension with calculated column</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-Dimension-with-calculated-column/m-p/1620525#M445740</link>
      <description>&lt;P&gt;Hi Qlik Gurus,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got stuck in a problem which I am trying to fix and not able to achieve. I want to filter out the data based on a particular dimension (i.e Dec in the table). I want to take the highest 'Dec' value and shown it in the chart. I want to achieve this UI level in calculated dimension. Basically want to remove the line item with &lt;STRONG&gt;low Dec value&lt;/STRONG&gt; and take the &lt;STRONG&gt;max(dec) value&lt;/STRONG&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have achieved some part where the Dec value is different for same ID the result is correct taking the max of Dec and getting one line item,.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ex: For ID 11234 I am getting the first line item where Dec is 9.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But problem started where both 'Dec' values are same. Code is not working and throws out both line items. for ID 93451 &amp;amp; 98735.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have to achieve this in UI level as per client requirement and cannot make changes in script level. Can anyone please help me out. Below is my expression I have used in calculated column.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;if(Dec=Aggr(max(Dec),[ID]),Dec)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;So, for each ID we will have only one line item with the highest Dec value or if Dec value is same we will have only one distinct line item.&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ID&lt;/TD&gt;&lt;TD&gt;First name&lt;/TD&gt;&lt;TD&gt;Last name&lt;/TD&gt;&lt;TD&gt;Address&lt;/TD&gt;&lt;TD&gt;City&lt;/TD&gt;&lt;TD&gt;Dec&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11234&lt;/TD&gt;&lt;TD&gt;John&lt;/TD&gt;&lt;TD&gt;Martin&lt;/TD&gt;&lt;TD&gt;Street&lt;/TD&gt;&lt;TD&gt;TX&lt;/TD&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11234&lt;/TD&gt;&lt;TD&gt;John&lt;/TD&gt;&lt;TD&gt;Martin&lt;/TD&gt;&lt;TD&gt;Street&lt;/TD&gt;&lt;TD&gt;TX&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;93451&lt;/TD&gt;&lt;TD&gt;Alice&lt;/TD&gt;&lt;TD&gt;osman&lt;/TD&gt;&lt;TD&gt;Street&lt;/TD&gt;&lt;TD&gt;IL&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;93451&lt;/TD&gt;&lt;TD&gt;Alice&lt;/TD&gt;&lt;TD&gt;osman&lt;/TD&gt;&lt;TD&gt;Street&lt;/TD&gt;&lt;TD&gt;IL&lt;/TD&gt;&lt;TD&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ate>Sat, 16 Nov 2024 20:08:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-Dimension-with-calculated-column/m-p/1620525#M445740</guid>
      <dc:creator>subhohere</dc:creator>
      <dc:date>2024-11-16T20:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct Dimension with calculated column</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-Dimension-with-calculated-column/m-p/1620537#M445742</link>
      <description>&lt;P&gt;Try this expression:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;=MAX(total &amp;lt;ID&amp;gt; Dec)&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="clipboard_image_0.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/18539iEE8EB44CF67E3292/image-size/medium?v=v2&amp;amp;px=400" role="button" title="clipboard_image_0.png" alt="clipboard_image_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 12:29:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-Dimension-with-calculated-column/m-p/1620537#M445742</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2019-09-05T12:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct Dimension with calculated column</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-Dimension-with-calculated-column/m-p/1620544#M445743</link>
      <description>&lt;P&gt;What other dimensions do you have in your chart... do any of those dimensions have different value for&amp;nbsp;&lt;SPAN&gt;93451 &amp;amp; 98735? Dimensions will always show unique values based on the combination of dimensions you have... if all the dimensions have the same value, they should not repeat....&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 12:37:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-Dimension-with-calculated-column/m-p/1620544#M445743</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-09-05T12:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct Dimension with calculated column</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-Dimension-with-calculated-column/m-p/1620546#M445744</link>
      <description>&lt;P&gt;The data provided by me is dummy data. When I applied this is real client qvw I am still getting&amp;nbsp; error in calculated column. The table is straight table where I am using your code for the calculated column.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 12:39:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-Dimension-with-calculated-column/m-p/1620546#M445744</guid>
      <dc:creator>subhohere</dc:creator>
      <dc:date>2019-09-05T12:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct Dimension with calculated column</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-Dimension-with-calculated-column/m-p/1620548#M445746</link>
      <description>&lt;P&gt;Sunny,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for replying so quickly. I have quite few dimensions in the straight table. I want to achieve a distinct record based on the Max(Dec) value.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 12:42:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-Dimension-with-calculated-column/m-p/1620548#M445746</guid>
      <dc:creator>subhohere</dc:creator>
      <dc:date>2019-09-05T12:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct Dimension with calculated column</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-Dimension-with-calculated-column/m-p/1620553#M445748</link>
      <description>&lt;P&gt;That make sense, but did my question make sense? If you have a dimension called Zip Code for example which doesn't have the same value.... Let's say 93451 have two rows with Zip Code 111001 and 111002 and you add Zip Code as a dimension.... then you will see two rows...&amp;nbsp; because both the rows still have Dec = 8...&amp;nbsp; What would you want to see for Zip Code if this happens? Randomly show 1? Show nothing? Show concatenated value?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 12:53:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-Dimension-with-calculated-column/m-p/1620553#M445748</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-09-05T12:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct Dimension with calculated column</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-Dimension-with-calculated-column/m-p/1622721#M445898</link>
      <description>&lt;P&gt;ok I got it. All other column values for duplicates are same except the Dec value.&amp;nbsp; It was showing error. But I got the code now, got it working.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I have created a calculated column and it's working fine except one. But the problem is for one ID it's not taking the if condition and getting suppressed due to ticking 'Suppress&amp;nbsp;Null value'. It is taking null. But Dec has got 5 &amp;amp; 8.&amp;nbsp;When I am taking the max of 'Dec' in text box for this particular id it's showing up correctly.&amp;nbsp; &amp;nbsp;Not sure what is the character in there for the Dec value.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Can you please tell a workaround for this?&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2019 15:41:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-Dimension-with-calculated-column/m-p/1622721#M445898</guid>
      <dc:creator>subhohere</dc:creator>
      <dc:date>2019-09-11T15:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct Dimension with calculated column</title>
      <link>https://community.qlik.com/t5/QlikView/Distinct-Dimension-with-calculated-column/m-p/1622735#M445899</link>
      <description>&lt;P&gt;Would you be able to share a dashboard where we can see this issue?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2019 16:14:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Distinct-Dimension-with-calculated-column/m-p/1622735#M445899</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-09-11T16:14:31Z</dc:date>
    </item>
  </channel>
</rss>

