<?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: Dual(subfield()) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Dual-subfield/m-p/783539#M1036613</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use the code provided in my previous reply. It should work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Dec 2014 07:42:45 GMT</pubDate>
    <dc:creator>MK_QSL</dc:creator>
    <dc:date>2014-12-24T07:42:45Z</dc:date>
    <item>
      <title>Dual(subfield())</title>
      <link>https://community.qlik.com/t5/QlikView/Dual-subfield/m-p/783534#M1036608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Merry Christmas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am unable to create price range for 1-5 (ie 4.999), 5-10, 10-15 etc. Can someone help to explain the logic works on following script ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Dual&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;SubField&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Class&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Price&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,4,'',1),' &amp;lt;= &amp;lt; ',1)&amp;amp;' - '&amp;amp;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;SubField&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Class&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Price&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,5,'',1),' &amp;lt;= &amp;lt; ',2) -1), &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Class&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Price&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,5,'',1)) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Price Group]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Thank you so much&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Tracy&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Dec 2014 23:56:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dual-subfield/m-p/783534#M1036608</guid>
      <dc:creator>tracycrown</dc:creator>
      <dc:date>2014-12-23T23:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: Dual(subfield())</title>
      <link>https://community.qlik.com/t5/QlikView/Dual-subfield/m-p/783535#M1036609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Provide sample data along with the result you are looking for... would help you on this...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Dec 2014 00:01:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dual-subfield/m-p/783535#M1036609</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-12-24T00:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: Dual(subfield())</title>
      <link>https://community.qlik.com/t5/QlikView/Dual-subfield/m-p/783536#M1036610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK... let me try without your reply or data..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use below function to create 0-5, 5-10, 10-15.... ranges&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dual(Replace(Class(Price,5),'&amp;lt;= x &amp;lt;','-'),Class(Price,5)) as [Price Group]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Class function is giving the final data range in numeric format..&lt;/P&gt;&lt;P&gt;Using Class(Price,5), you will get result something like&lt;/P&gt;&lt;P&gt;0&amp;lt;= x &amp;lt;5&lt;/P&gt;&lt;P&gt;5&amp;lt;=x &amp;lt;10&lt;/P&gt;&lt;P&gt;etc&lt;/P&gt;&lt;P&gt;but if you want to replace '&amp;lt;= x &amp;lt;' with '-', we have to use replace function.&lt;/P&gt;&lt;P&gt;But replace function will give your the final result in text format, so if you try to sort your final chart based on Price Group field, you will get sorting something 0-5, 10-15, 20-25 etc.. (i.e. sort by text)&lt;/P&gt;&lt;P&gt;Dual function will store the data both Text and Number format... Dual(Text,Number), so you can sort by numeric value also..&lt;/P&gt;&lt;P&gt;Hope this would help..&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Happy Qliking.. !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Dec 2014 00:11:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dual-subfield/m-p/783536#M1036610</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-12-24T00:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: Dual(subfield())</title>
      <link>https://community.qlik.com/t5/QlikView/Dual-subfield/m-p/783537#M1036611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Manish&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Thank you for your quick response, please see attached data file.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Tracy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Dec 2014 01:10:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dual-subfield/m-p/783537#M1036611</guid>
      <dc:creator>tracycrown</dc:creator>
      <dc:date>2014-12-24T01:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: Dual(subfield())</title>
      <link>https://community.qlik.com/t5/QlikView/Dual-subfield/m-p/783538#M1036612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tracy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find below script for solution&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Using Class&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;LOAD Item, &lt;/P&gt;&lt;P&gt;&amp;nbsp; Dual(Replace(Class([Unit Price],5),'&amp;lt;= x &amp;lt;','-'),[Unit Price]) as [Price Group],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Unit Price]&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P&gt;(biff, embedded labels, table is POS$);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Using Floor &amp;amp; Ceil functions&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;LOAD Item, &lt;/P&gt;&lt;P&gt;&amp;nbsp; Dual(Floor([Unit Price], 5) &amp;amp; '-' &amp;amp; Ceil([Unit Price], 5), [Unit Price]) AS [Price Group],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Unit Price]&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P&gt;(biff, embedded labels, table is POS$);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Dec 2014 01:51:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dual-subfield/m-p/783538#M1036612</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2014-12-24T01:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: Dual(subfield())</title>
      <link>https://community.qlik.com/t5/QlikView/Dual-subfield/m-p/783539#M1036613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use the code provided in my previous reply. It should work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Dec 2014 07:42:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dual-subfield/m-p/783539#M1036613</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-12-24T07:42:45Z</dc:date>
    </item>
  </channel>
</rss>

