<?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 and only functions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/dual-and-only-functions/m-p/233080#M84624</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have some troubles to understand when the use of these functions are needed.&lt;/P&gt;&lt;P&gt;From the dual example in the manual the dual is kind of a mapping?&lt;/P&gt;&lt;P&gt;For the Only I can follow the examples in the manual but I have seen it used many times in the forum answers and can't follow it's impact.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 May 2010 09:19:29 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-05-06T09:19:29Z</dc:date>
    <item>
      <title>dual and only functions</title>
      <link>https://community.qlik.com/t5/QlikView/dual-and-only-functions/m-p/233080#M84624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have some troubles to understand when the use of these functions are needed.&lt;/P&gt;&lt;P&gt;From the dual example in the manual the dual is kind of a mapping?&lt;/P&gt;&lt;P&gt;For the Only I can follow the examples in the manual but I have seen it used many times in the forum answers and can't follow it's impact.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 May 2010 09:19:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/dual-and-only-functions/m-p/233080#M84624</guid>
      <dc:creator />
      <dc:date>2010-05-06T09:19:29Z</dc:date>
    </item>
    <item>
      <title>dual and only functions</title>
      <link>https://community.qlik.com/t5/QlikView/dual-and-only-functions/m-p/233081#M84625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;As you said Dual is a Kind of Mapping.&lt;/P&gt;&lt;P&gt;Dual function Is much usefull when u want to represent a String as a Numeric then we use this.&lt;/P&gt;&lt;P&gt;Only Function :&lt;/P&gt;&lt;P&gt;If &lt;I&gt;expression&lt;/I&gt; over a number of records, as defined by a &lt;B&gt;group by&lt;/B&gt; clause, contains only one numeric value, that value is returned. Else, NULL is returned.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ajay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 May 2010 10:43:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/dual-and-only-functions/m-p/233081#M84625</guid>
      <dc:creator>spsrk_84</dc:creator>
      <dc:date>2010-05-06T10:43:58Z</dc:date>
    </item>
    <item>
      <title>dual and only functions</title>
      <link>https://community.qlik.com/t5/QlikView/dual-and-only-functions/m-p/233082#M84626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&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="padding-left:30px;"&gt;High&lt;BR /&gt;Medium&lt;BR /&gt;Low&lt;/P&gt;&lt;P&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="padding-left:30px;"&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&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&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 May 2010 23:43:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/dual-and-only-functions/m-p/233082#M84626</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-05-06T23:43:05Z</dc:date>
    </item>
  </channel>
</rss>

