<?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 Calculate a spread in Expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculate-a-spread-in-Expression/m-p/145313#M24046</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok fine, I try something and think i'm on the right way.&lt;/P&gt;&lt;P&gt;I can get the price for selected maturity doing the folowing:&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;MATURITY={"$(=GetFieldSelections(MATURITY))"}&amp;gt;} PRICE)&lt;/P&gt;&lt;P&gt;This only works when we have 1 maturity selected.&lt;/P&gt;&lt;P&gt;The GetFieldSelections function can return all the selection that mean that if i have 2 maturity, GetFieldSelections must return M1,M2.&lt;/P&gt;&lt;P&gt;The question is now, how to get the first maturity and the second one from this expression?&lt;/P&gt;&lt;P&gt;Thxs again for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 May 2009 16:35:24 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-05-29T16:35:24Z</dc:date>
    <item>
      <title>Calculate a spread in Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-a-spread-in-Expression/m-p/145311#M24044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I'm trying to graph a spread between 2 series.&lt;/P&gt;&lt;P&gt;You'll find enclosed an exemple file.&lt;/P&gt;&lt;P&gt;What i'm trying to do is to add a curve in the graph corresponding to the sprerad between 2 maturities. I mean that if you choose for exemple M1 &amp;amp; M2, the curve should show M2-M1 price (or M1-M2). And if i change selection to M3&amp;amp;M1 the curve will be M3-M1 or M1-M3.&lt;/P&gt;&lt;P&gt;Is anyone already try to do it.&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2009 17:49:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-a-spread-in-Expression/m-p/145311#M24044</guid>
      <dc:creator />
      <dc:date>2009-05-28T17:49:03Z</dc:date>
    </item>
    <item>
      <title>Calculate a spread in Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-a-spread-in-Expression/m-p/145312#M24045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know that i must use Set Analysis to do so, but i didn't succeed.&lt;/P&gt;&lt;P&gt;No one have already try to compare series, like this ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2009 16:08:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-a-spread-in-Expression/m-p/145312#M24045</guid>
      <dc:creator />
      <dc:date>2009-05-29T16:08:39Z</dc:date>
    </item>
    <item>
      <title>Calculate a spread in Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-a-spread-in-Expression/m-p/145313#M24046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok fine, I try something and think i'm on the right way.&lt;/P&gt;&lt;P&gt;I can get the price for selected maturity doing the folowing:&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;MATURITY={"$(=GetFieldSelections(MATURITY))"}&amp;gt;} PRICE)&lt;/P&gt;&lt;P&gt;This only works when we have 1 maturity selected.&lt;/P&gt;&lt;P&gt;The GetFieldSelections function can return all the selection that mean that if i have 2 maturity, GetFieldSelections must return M1,M2.&lt;/P&gt;&lt;P&gt;The question is now, how to get the first maturity and the second one from this expression?&lt;/P&gt;&lt;P&gt;Thxs again for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2009 16:35:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-a-spread-in-Expression/m-p/145313#M24046</guid>
      <dc:creator />
      <dc:date>2009-05-29T16:35:24Z</dc:date>
    </item>
    <item>
      <title>Calculate a spread in Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-a-spread-in-Expression/m-p/145314#M24047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok one step forward but this time really don't no how to solve it.&lt;/P&gt;&lt;P&gt;I used the subfield function to get the 2 distinct maturity.&lt;/P&gt;&lt;P&gt;The expression SubField(GetFieldSelections(MATURITY),',',2) give me the 2nd selected maturity (for example M2)&lt;/P&gt;&lt;P&gt;But the following expression:&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;MATURITY={"$(=SubFieldGetFieldSelectionsMATURITY),',',2))"}&amp;gt;} PRICE)&lt;/P&gt;&lt;P&gt;do not return the Price for maturity M2 and just note: No data to display..&lt;/P&gt;&lt;P&gt;any idea ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2009 17:58:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-a-spread-in-Expression/m-p/145314#M24047</guid>
      <dc:creator />
      <dc:date>2009-05-29T17:58:52Z</dc:date>
    </item>
    <item>
      <title>Calculate a spread in Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-a-spread-in-Expression/m-p/145315#M24048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok i foundthe answer.&lt;/P&gt;&lt;P&gt;In fact, it works well but you have to be careful with the GetFieldSelections statement.&lt;/P&gt;&lt;P&gt;If you don't put a delimiter, it use the default one which is ', '. that mean that there is a space between the coma and the second selection.And then the subfield statement for the second field keep the space.&lt;/P&gt;&lt;P&gt;So 2 solutions:&lt;/P&gt;&lt;P&gt;1/ use the Trim function to supress blank.&lt;/P&gt;&lt;P&gt;2/ Precise the delimiter ,e.g. ',' for example and then you will have no space after the delimiter.&lt;/P&gt;&lt;P&gt;Tricky things.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2009 14:58:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-a-spread-in-Expression/m-p/145315#M24048</guid>
      <dc:creator />
      <dc:date>2009-06-02T14:58:51Z</dc:date>
    </item>
  </channel>
</rss>

