<?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 Passing parameters to set analysis expression called by FirstSortedValue function. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Passing-parameters-to-set-analysis-expression-called-by/m-p/965453#M330954</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello community. I need help passing parameters to set analysis expression called by FirstSortedValue function. Here is my scenario:&lt;/P&gt;&lt;P&gt;I have an island table:&lt;/P&gt;&lt;TABLE border="1" cellpadding="0" cellspacing="0" style="border: none;" width="557"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="158"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: black;"&gt;%Measure_Nbr&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border: solid windowtext 1.0pt; border-left: none; padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="398"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: black;"&gt;%Measure_Formula&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border: solid windowtext 1.0pt; border-top: none; padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="158"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: black;"&gt;1&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="398"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: black;"&gt;Sum({&amp;lt;$1, $2&amp;gt;} DOLLARS)&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border: solid windowtext 1.0pt; border-top: none; padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="158"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: black;"&gt;2&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="398"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: black;"&gt;Sum({&amp;lt;$1, $2&amp;gt;} UNITS)&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border: solid windowtext 1.0pt; border-top: none; padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="158"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: black;"&gt;3&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="398"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: black;"&gt;Sum({&amp;lt;$1, $2&amp;gt;} DOLLARS)/Sum({&amp;lt;$1, $2&amp;gt;} UNITS)&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%Measure_Formula has parameter ( $1), ($2) for different set analysis that I will pass as variables. For example: &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;saProductJuice = [Product] = {‘Juice’}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;saCountryUSA = [Country] = {‘USA}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;When I pass one of those variables as parameters, result should be different variations of measures and set analysis. Something like this :&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;Sum({&amp;lt;[Product] = {‘Juice’}&amp;gt;} DOLLARS)&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;or Sum({&amp;lt;[Product] = {‘Juice’},&amp;nbsp; [Country] = {‘USA}&amp;gt;} UNITS)&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;In my chart, I use following variable to call measure:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;vExpression = FirstSortedValue({1} %Measure_Formula, %Measure_Nbr,&lt;STRONG&gt;$1&lt;/STRONG&gt;) – Where $1 is another parameter specifying measure I want. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;So here is a problem I need help with: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;Result of&amp;nbsp; $(vExpression(1)) &lt;STRONG&gt;returns&amp;nbsp; Sum({&amp;lt;$1, $2&amp;gt;} DOLLARS)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;But I can’t pass more parameters for my set analysis inside of expression. I need something like &lt;STRONG&gt;Sum({&amp;lt;[Product] = {‘Juice’}&amp;gt;} DOLLARS)&amp;nbsp; &lt;/STRONG&gt;when I execute FirstSortedValue.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;Please help and thank you. &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Sep 2015 16:24:19 GMT</pubDate>
    <dc:creator>maksik</dc:creator>
    <dc:date>2015-09-16T16:24:19Z</dc:date>
    <item>
      <title>Passing parameters to set analysis expression called by FirstSortedValue function.</title>
      <link>https://community.qlik.com/t5/QlikView/Passing-parameters-to-set-analysis-expression-called-by/m-p/965453#M330954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello community. I need help passing parameters to set analysis expression called by FirstSortedValue function. Here is my scenario:&lt;/P&gt;&lt;P&gt;I have an island table:&lt;/P&gt;&lt;TABLE border="1" cellpadding="0" cellspacing="0" style="border: none;" width="557"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="158"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: black;"&gt;%Measure_Nbr&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border: solid windowtext 1.0pt; border-left: none; padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="398"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: black;"&gt;%Measure_Formula&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border: solid windowtext 1.0pt; border-top: none; padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="158"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: black;"&gt;1&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="398"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: black;"&gt;Sum({&amp;lt;$1, $2&amp;gt;} DOLLARS)&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border: solid windowtext 1.0pt; border-top: none; padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="158"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: black;"&gt;2&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="398"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: black;"&gt;Sum({&amp;lt;$1, $2&amp;gt;} UNITS)&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border: solid windowtext 1.0pt; border-top: none; padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="158"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: black;"&gt;3&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="398"&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: black;"&gt;Sum({&amp;lt;$1, $2&amp;gt;} DOLLARS)/Sum({&amp;lt;$1, $2&amp;gt;} UNITS)&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%Measure_Formula has parameter ( $1), ($2) for different set analysis that I will pass as variables. For example: &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;saProductJuice = [Product] = {‘Juice’}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;saCountryUSA = [Country] = {‘USA}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;When I pass one of those variables as parameters, result should be different variations of measures and set analysis. Something like this :&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;Sum({&amp;lt;[Product] = {‘Juice’}&amp;gt;} DOLLARS)&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;or Sum({&amp;lt;[Product] = {‘Juice’},&amp;nbsp; [Country] = {‘USA}&amp;gt;} UNITS)&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;In my chart, I use following variable to call measure:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;vExpression = FirstSortedValue({1} %Measure_Formula, %Measure_Nbr,&lt;STRONG&gt;$1&lt;/STRONG&gt;) – Where $1 is another parameter specifying measure I want. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;So here is a problem I need help with: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;Result of&amp;nbsp; $(vExpression(1)) &lt;STRONG&gt;returns&amp;nbsp; Sum({&amp;lt;$1, $2&amp;gt;} DOLLARS)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;But I can’t pass more parameters for my set analysis inside of expression. I need something like &lt;STRONG&gt;Sum({&amp;lt;[Product] = {‘Juice’}&amp;gt;} DOLLARS)&amp;nbsp; &lt;/STRONG&gt;when I execute FirstSortedValue.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black;"&gt;Please help and thank you. &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Sep 2015 16:24:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Passing-parameters-to-set-analysis-expression-called-by/m-p/965453#M330954</guid>
      <dc:creator>maksik</dc:creator>
      <dc:date>2015-09-16T16:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: Passing parameters to set analysis expression called by FirstSortedValue function.</title>
      <link>https://community.qlik.com/t5/QlikView/Passing-parameters-to-set-analysis-expression-called-by/m-p/965454#M330955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I hope this would be helpful for you: &lt;A href="https://community.qlik.com/thread/119550"&gt;Nesting Variables with parameters&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Sep 2015 16:35:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Passing-parameters-to-set-analysis-expression-called-by/m-p/965454#M330955</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-09-16T16:35:08Z</dc:date>
    </item>
  </channel>
</rss>

