<?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: Sorting based on Dual() in cross tab when duplicate records exist. in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Sorting-based-on-Dual-in-cross-tab-when-duplicate-records-exist/m-p/135338#M9499</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your response Felip, but the sorting does not work if priority column in placed after profile column in the mentioned solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Jul 2018 18:57:01 GMT</pubDate>
    <dc:creator>jahnavi11</dc:creator>
    <dc:date>2018-07-30T18:57:01Z</dc:date>
    <item>
      <title>Sorting based on Dual() in cross tab when duplicate records exist.</title>
      <link>https://community.qlik.com/t5/App-Development/Sorting-based-on-Dual-in-cross-tab-when-duplicate-records-exist/m-p/135336#M9497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the below data set, when put in a cross tab in Qliksense and sorted on profile ID by expression priority below is the result . It does not consider the sorting unless selected on a customer. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I use Dual function on Profile, in the below table , it modifies the value for profile. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way I can sort this data set, by customer and by profile id sorted by priority.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Cross tab.PNG" class="jive-image image-1" src="/legacyfs/online/209128_Cross tab.PNG" style="height: 447px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dataset:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;TEMP1:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;LOAD&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;* inline [&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;customer|profile|priority&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;14368|41214|6&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;14368|9055|1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;14368|41214|3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;14109|41214|6&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;14109|41480|1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;14109|41370|2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;13339|9055|7&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;4633|19018|7&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;] (delimiter is '|');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;NoConcatenate&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;[DUAL]:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;LOAD &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;customer,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;DUAL(TEXT(profile),NUM(priority)) as profile,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;priority&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;RESIDENT TEMP1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;NoConcatenate&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;[ORIGINAL]:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;LOAD &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;customer AS customer_orig,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;profile as profile_orig,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;priority as priority_orig&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;RESIDENT TEMP1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;DROP TABLE TEMP1;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Nov 2024 07:53:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sorting-based-on-Dual-in-cross-tab-when-duplicate-records-exist/m-p/135336#M9497</guid>
      <dc:creator>jahnavi11</dc:creator>
      <dc:date>2024-11-16T07:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting based on Dual() in cross tab when duplicate records exist.</title>
      <link>https://community.qlik.com/t5/App-Development/Sorting-based-on-Dual-in-cross-tab-when-duplicate-records-exist/m-p/135337#M9498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dual can sometimes be a little tricky.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of doing the conversion of the number to text inside dual, do something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_15329710846161213" jivemacro_uid="_15329710846161213" modifiedtitle="true"&gt;
&lt;P&gt;EMP1:&lt;/P&gt;
&lt;P&gt;load&lt;/P&gt;
&lt;P&gt;*,&lt;/P&gt;
&lt;P&gt;// Dual made from a text field instead of the conversion of number to text directly&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;dual(_txtProfile,profile) as xxxx;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;LOAD customer,&lt;/P&gt;
&lt;P&gt;profile,&lt;/P&gt;
&lt;P&gt;text(profile) as _txtProfile,&lt;/P&gt;
&lt;P&gt;priority;&lt;/P&gt;
&lt;P&gt;LOAD * inline [&lt;/P&gt;
&lt;P&gt;customer|profile|priority&lt;/P&gt;
&lt;P&gt;14368|41214|6&lt;/P&gt;
&lt;P&gt;14368|9055|1&lt;/P&gt;
&lt;P&gt;14368|41214|3&lt;/P&gt;
&lt;P&gt;14109|41214|6&lt;/P&gt;
&lt;P&gt;14109|41480|1&lt;/P&gt;
&lt;P&gt;14109|41370|2&lt;/P&gt;
&lt;P&gt;13339|9055|7&lt;/P&gt;
&lt;P&gt;4633|19018|7&lt;/P&gt;
&lt;P&gt;] (delimiter is '|');&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This gets me the right values, like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="sample.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/209297_sample.png" style="height: 496px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2018 17:19:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sorting-based-on-Dual-in-cross-tab-when-duplicate-records-exist/m-p/135337#M9498</guid>
      <dc:creator>felipedl</dc:creator>
      <dc:date>2018-07-30T17:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting based on Dual() in cross tab when duplicate records exist.</title>
      <link>https://community.qlik.com/t5/App-Development/Sorting-based-on-Dual-in-cross-tab-when-duplicate-records-exist/m-p/135338#M9499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your response Felip, but the sorting does not work if priority column in placed after profile column in the mentioned solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2018 18:57:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sorting-based-on-Dual-in-cross-tab-when-duplicate-records-exist/m-p/135338#M9499</guid>
      <dc:creator>jahnavi11</dc:creator>
      <dc:date>2018-07-30T18:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting based on Dual() in cross tab when duplicate records exist.</title>
      <link>https://community.qlik.com/t5/App-Development/Sorting-based-on-Dual-in-cross-tab-when-duplicate-records-exist/m-p/135339#M9500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For it to be sorted by priority first, you need to change the dimension to the first level of the pivot table, since it does for the n dimension and goes down to n-1 dimension till the last one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="sample.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/209388_sample.png" style="height: 496px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2018 11:19:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sorting-based-on-Dual-in-cross-tab-when-duplicate-records-exist/m-p/135339#M9500</guid>
      <dc:creator>felipedl</dc:creator>
      <dc:date>2018-07-31T11:19:46Z</dc:date>
    </item>
  </channel>
</rss>

