<?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: use of possible function in set analysis expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/use-of-possible-function-in-set-analysis-expression/m-p/436361#M490706</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What do you use as a chart dimension ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Sep 2012 18:58:21 GMT</pubDate>
    <dc:creator>whiteline</dc:creator>
    <dc:date>2012-09-25T18:58:21Z</dc:date>
    <item>
      <title>use of possible function in set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/use-of-possible-function-in-set-analysis-expression/m-p/436354#M490699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to use set analysis as an expression of a pivot table chart.&amp;nbsp; There are 2 tables that are relevant to achieving the logic that is desired.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One table has "projections" and the other "results".&amp;nbsp; In essence I am attempting to line up results with projections.&amp;nbsp; I have stripped down the logic a little so that I can hopefully convey the issue that I am facing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I use an expression like this to reveal the projections version number of interest, it works.&amp;nbsp; Let's say this shows that version 1.2 is the answer. &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( {&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;projections.os&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;p&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;os&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;projections.pl_ver_num&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;lt;= &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;pl_ver_num&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;projections.pl_ver_num&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;The result of this expression needs to feed into another expression to finally show me the entire list of projections that are part of the 1.2 version.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead, I would like to achieve this action in a single expression by extending the logic in my set analysis expression BUT it is not working as expected?&amp;nbsp; I am wondering if it is a syntax error?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;( {&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;projections.os&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;p&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;os&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;), &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;projections.pl_ver&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"&amp;lt;=$(=p(pl_ver))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;projections.pl_ver&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;If I replace the test for the version number in the set analysis expression above (i.e., the stuff between the {})&amp;nbsp; with {"&amp;lt;=1.2"} then this expression works which leads me to believe that my syntax is at fault? &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;If I create a separate text box for testing, and use the possible funciton on pl_ver I can see that it returns 1.2, which is expected.﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Any help would be appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2012 21:18:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/use-of-possible-function-in-set-analysis-expression/m-p/436354#M490699</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-24T21:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: use of possible function in set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/use-of-possible-function-in-set-analysis-expression/m-p/436355#M490700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;You can use 'search' camabilities of set analysis instead:&lt;/P&gt;&lt;P&gt;=max( {&amp;lt;projections.os=p(os), projections.pl_ver={"=&lt;STRONG&gt;projections.pl_ver_num&amp;lt;=pl_ver_num&lt;/STRONG&gt;"}&amp;gt;} projections.pl_ver)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It should select from projections.pl_ver only thouse values that have (projections.pl_ver_num&amp;lt;=pl_ver_num)=true.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Sep 2012 09:42:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/use-of-possible-function-in-set-analysis-expression/m-p/436355#M490700</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2012-09-25T09:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: use of possible function in set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/use-of-possible-function-in-set-analysis-expression/m-p/436356#M490701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you it worked, appreciate your feedback.&amp;nbsp; Can you please help me extend this further such that I can embed the "max" inside the set analysis expression.&amp;nbsp; Again, I struggle with the syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like a single version as the outcome.&amp;nbsp; Currently the set returns a set of values 0, 1.1, 1.2.&amp;nbsp; I want 1.2 as a&amp;nbsp; result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, something like &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;projections.pl_ver={"=$(=max(projections.pl_ver_num&amp;lt;=pl_ver_num))"}&amp;gt;} projections.some_field&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Sep 2012 16:31:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/use-of-possible-function-in-set-analysis-expression/m-p/436356#M490701</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-25T16:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: use of possible function in set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/use-of-possible-function-in-set-analysis-expression/m-p/436357#M490702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, didn't understand your issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is max already:&lt;/P&gt;&lt;P&gt;=&lt;STRONG&gt;max&lt;/STRONG&gt;( {&amp;lt;projections.os=p(os), projections.pl_ver={"=projections.pl_ver_num&amp;lt;=pl_ver_num"}&amp;gt;} projections.pl_ver_&lt;STRONG&gt;num&lt;/STRONG&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course you can sort it and return the last value with firstsortedvalue():&lt;/P&gt;&lt;P&gt; =&lt;STRONG&gt;firstsortedvalue&lt;/STRONG&gt;({&amp;lt;projections.os=p(os), projections.pl_ver={"=projections.pl_ver_num&amp;lt;=pl_ver_num"}&amp;gt;} projections.pl_ver, &lt;STRONG&gt;-&lt;/STRONG&gt;projections.pl_ver_&lt;STRONG&gt;num&lt;/STRONG&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Sep 2012 17:50:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/use-of-possible-function-in-set-analysis-expression/m-p/436357#M490702</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2012-09-25T17:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: use of possible function in set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/use-of-possible-function-in-set-analysis-expression/m-p/436358#M490703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apologies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently, the max() evaluates to a version # (1.2).&amp;nbsp; This is then fed into another expression to index a correspoding value (a battery current measurement in my application).&amp;nbsp; So version 1.1 may return a current value of 5mA, 1.2 a value of 8mA.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The max() expression that you have helped to solve returns ver 1.2, now I need to parse out the corresponding current value of 8mA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am essentially trying to retrieve current[1.2] vs. current[1.1] vs current[1.0].&amp;nbsp; The max expression in the set analysis should return the 1.2, so hopefully this clarifies what I am trying to achieve:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;projections.pl_ver={"=$(=max(projections.pl_ver_num&amp;lt;=pl_ver_num))"}&amp;gt;} projections.battery_current&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Sep 2012 18:18:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/use-of-possible-function-in-set-analysis-expression/m-p/436358#M490703</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-25T18:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: use of possible function in set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/use-of-possible-function-in-set-analysis-expression/m-p/436359#M490704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could try this one:&lt;/P&gt;&lt;P&gt;=firstsortedvalue({&amp;lt;projections.os=p(os), projections.pl_ver={"=projections.pl_ver_num&amp;lt;=pl_ver_num"}&amp;gt;} projections.battery_current, -projections.pl_ver_num)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or this one:&lt;/P&gt;&lt;P&gt;=Only({&amp;lt;projections.os=p(os), projections.pl_ver={"&lt;STRONG&gt;=projections.pl_ver_num=rangemin(max(projections.pl_ver_num), pl_ver_num)&lt;/STRONG&gt;"}&amp;gt;} projections.battery_current)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Sep 2012 18:27:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/use-of-possible-function-in-set-analysis-expression/m-p/436359#M490704</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2012-09-25T18:27:15Z</dc:date>
    </item>
    <item>
      <title>Re: use of possible function in set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/use-of-possible-function-in-set-analysis-expression/m-p/436360#M490705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Both are great suggestions.&amp;nbsp; I am attempting to execute this expression in a pivot table chart.&amp;nbsp; Does this matter?&amp;nbsp; None of the ideas seem to be working.&amp;nbsp; Your logic seems sound to me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Sep 2012 18:57:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/use-of-possible-function-in-set-analysis-expression/m-p/436360#M490705</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-25T18:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: use of possible function in set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/use-of-possible-function-in-set-analysis-expression/m-p/436361#M490706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What do you use as a chart dimension ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Sep 2012 18:58:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/use-of-possible-function-in-set-analysis-expression/m-p/436361#M490706</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2012-09-25T18:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: use of possible function in set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/use-of-possible-function-in-set-analysis-expression/m-p/436362#M490707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have many dimensions none of which directly feed into the expression.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Through table association,&amp;nbsp; though, there are many indirect values that are used.&amp;nbsp; &lt;/P&gt;&lt;P&gt;For example, I have a software ID as a dimension and it is linked to an OS but OS is not directly referenced nor selected by a user.&amp;nbsp; This&amp;nbsp; is why I used the possible function to select the OS.&amp;nbsp; &lt;/P&gt;&lt;P&gt;The same is true for the pl_ver_num field above.&amp;nbsp; The table dimension software ID also indirectly chooses the various pl_ver_num's (1.1, 1.2).&amp;nbsp; I also have a test ID that is a dimension.&amp;nbsp; In essence I store battery current for a number of IDs across various software versions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I took the first expression that you sent me (your first post) and created a field in my pivot table (for debugging) and it yields the correct version # across all dimensions.&amp;nbsp; I have created a new expression in the table, with the new suggestions that don't seem to kick in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will add that I just tried to place your "firstsortedvalue" suggestion in a text box, becasue it makes too much sense to me, and this is working.&amp;nbsp; I am playing further to see why it is not working in the context of the pivot table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Sep 2012 20:05:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/use-of-possible-function-in-set-analysis-expression/m-p/436362#M490707</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-25T20:05:49Z</dc:date>
    </item>
  </channel>
</rss>

