<?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 Dual function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Dual-function/m-p/562649#M210002</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 Tell me where can i use Dual function in Scrip&lt;/P&gt;&lt;P&gt;Give me some Example script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Niranjan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Jul 2013 06:15:55 GMT</pubDate>
    <dc:creator>NavinReddy</dc:creator>
    <dc:date>2013-07-11T06:15:55Z</dc:date>
    <item>
      <title>Dual function</title>
      <link>https://community.qlik.com/t5/QlikView/Dual-function/m-p/562649#M210002</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 Tell me where can i use Dual function in Scrip&lt;/P&gt;&lt;P&gt;Give me some Example script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Niranjan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2013 06:15:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dual-function/m-p/562649#M210002</guid>
      <dc:creator>NavinReddy</dc:creator>
      <dc:date>2013-07-11T06:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: Dual function</title>
      <link>https://community.qlik.com/t5/QlikView/Dual-function/m-p/562650#M210003</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 Got some information Here community &lt;/P&gt;&lt;P style="background-color: #f5f5f5; color: #737373; font-family: Arial;"&gt;You use dual() when you need both a text and a numeric representation of a value. For instance, maybe you have a priority field.&lt;/P&gt;&lt;P style="background-color: #f5f5f5; padding: 0 0 0 30px; color: #737373; font-family: Arial;"&gt;High&lt;BR /&gt;Medium&lt;BR /&gt;Low&lt;/P&gt;&lt;P style="background-color: #f5f5f5; color: #737373; font-family: Arial;"&gt;That's great for display, but not good for sorting, or taking the max(Priority), that kind of thing. So we might instead define it like this:&lt;/P&gt;&lt;P style="background-color: #f5f5f5; padding: 0 0 0 30px; color: #737373; font-family: Arial;"&gt;LOAD dual(Text,Number) as Priority&lt;BR /&gt;INLINE [&lt;BR /&gt;Text,Number&lt;BR /&gt;High,3&lt;BR /&gt;Medium,2&lt;BR /&gt;Low,1&lt;BR /&gt;];&lt;/P&gt;&lt;P style="background-color: #f5f5f5; color: #737373; font-family: Arial;"&gt;Now, there might be other and even better ways to handle this particular example, but that's kind of the idea.&lt;/P&gt;&lt;P style="background-color: #f5f5f5; color: #737373; font-family: Arial;"&gt;Dates WOULD be a very good example if they didn't have their own format. A date has a text representation like 'May 6, 2010', and also a numeric represenation, 40304. Normally, you want to see the text version, but you often want to sort and do mathematical manipulation using the underlying numeric, such as adding days to get a new date. Dual() makes some other sort of field behave similarly, where the text representation is what is normally displayed, but there's still a number in there that you can sort by and manipulate mathematically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #f5f5f5; color: #737373; font-family: Arial;"&gt;Hi Hardik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #f5f5f5; color: #737373; font-family: Arial;"&gt;You can use Dual() for this purpose, it is a dual datatype what you have to do is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #f5f5f5; color: #737373; font-family: Arial;"&gt;if(field='A', Dual('0-20000', 1),&lt;/P&gt;&lt;P style="background-color: #f5f5f5; color: #737373; font-family: Arial;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(field='A', Dual('20001-40000', 2),&lt;/P&gt;&lt;P style="background-color: #f5f5f5; color: #737373; font-family: Arial;"&gt;'&lt;/P&gt;&lt;P style="background-color: #f5f5f5; color: #737373; font-family: Arial;"&gt;'&lt;/P&gt;&lt;P style="background-color: #f5f5f5; color: #737373; font-family: Arial;"&gt;'&lt;/P&gt;&lt;P style="background-color: #f5f5f5; color: #737373; font-family: Arial;"&gt;'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #f5f5f5; color: #737373; font-family: Arial;"&gt;Now in chart the values are automatically sorted by using the second parameter in Dual().&lt;/P&gt;&lt;P style="background-color: #f5f5f5; color: #737373; font-family: Arial;"&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #f5f5f5; color: #737373; font-family: Arial;"&gt;Regards,&lt;/P&gt;&lt;P style="background-color: #f5f5f5; color: #737373; font-family: Arial;"&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2013 06:17:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dual-function/m-p/562650#M210003</guid>
      <dc:creator>NavinReddy</dc:creator>
      <dc:date>2013-07-11T06:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: Dual function</title>
      <link>https://community.qlik.com/t5/QlikView/Dual-function/m-p/562651#M210004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Go to this link&lt;/P&gt;&lt;P&gt;&lt;A class="loading" href="http://www.learnqlickview.com/dual-function-in-qlikview/"&gt;http://www.learnqlickview.com/dual-function-in-qlikview/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="loading" href="http://www.qlikviewaddict.com/2012/12/the-qlikview-dual-function.html"&gt;http://www.qlikviewaddict.com/2012/12/the-qlikview-dual-function.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="loading" href="http://www.youtube.com/watch?v=xUpPufXfikc"&gt;http://www.youtube.com/watch?v=xUpPufXfikc&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2013 06:38:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dual-function/m-p/562651#M210004</guid>
      <dc:creator>er_mohit</dc:creator>
      <dc:date>2013-07-11T06:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: Dual function</title>
      <link>https://community.qlik.com/t5/QlikView/Dual-function/m-p/562652#M210005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class="syntax"&gt;&lt;SPAN class="Bold"&gt;dual( &lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;s , x&lt;/SPAN&gt;&lt;SPAN class="Bold"&gt; )&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Forced association of an arbitrary string representation &lt;SPAN class="Italic"&gt;s&lt;/SPAN&gt; with a given number representation &lt;SPAN class="Italic"&gt;x&lt;/SPAN&gt;. In QlikView, when several data items read into one field have different string representations but the same valid number representation, they will all share the first string representation encountered. The dual function is typically used early in the script, before other data is read into the field concerned, in order to create that first string representation, which will be shown in list boxes etc. &lt;/P&gt;&lt;P class="example"&gt;Example:&lt;/P&gt;&lt;P class="Code"&gt;load dual ( string,numrep ) as DayOfWeek inline &lt;/P&gt;&lt;P class="Code"&gt;[ string,numrep &lt;/P&gt;&lt;P class="Code"&gt;Monday,0 &lt;/P&gt;&lt;P class="Code"&gt;Tuesday,1 &lt;/P&gt;&lt;P class="Code"&gt;Wednesday,2 &lt;/P&gt;&lt;P class="Code"&gt;Thursday,3 &lt;/P&gt;&lt;P class="Code"&gt;Friday,4 &lt;/P&gt;&lt;P class="Code"&gt;Saturday,5 &lt;/P&gt;&lt;P class="Code"&gt;Sunday,6 ]; &lt;/P&gt;&lt;P class="Code"&gt;load Date, weekday(Date) as DayOfWeek from afile.csv; &lt;/P&gt;&lt;P&gt;The script example will generate a field &lt;SPAN class="Italic"&gt;DayOfWeek&lt;/SPAN&gt; with the weekdays written in clear text. QlikView will for all purposes regard the field as a numeric field. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2013 06:39:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dual-function/m-p/562652#M210005</guid>
      <dc:creator />
      <dc:date>2013-07-11T06:39:27Z</dc:date>
    </item>
  </channel>
</rss>

