<?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: Parameterized variables in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Parameterized-variables/m-p/2495674#M102565</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/28038"&gt;@marcus_sommer&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;it doesn't work as you suggested&lt;BR /&gt;if ($1 = 'actual'....&lt;BR /&gt;the editor gives an error&lt;/P&gt;</description>
    <pubDate>Tue, 03 Dec 2024 03:52:09 GMT</pubDate>
    <dc:creator>ali_hijazi</dc:creator>
    <dc:date>2024-12-03T03:52:09Z</dc:date>
    <item>
      <title>Parameterized variables</title>
      <link>https://community.qlik.com/t5/App-Development/Parameterized-variables/m-p/2495473#M102531</link>
      <description>&lt;P&gt;Hello&lt;BR /&gt;I got a parameterized variable in my App defined as follows:&lt;BR /&gt;&lt;STRONG&gt;sum({&amp;lt;Scenario={$1},NMY={$2},AGGREGATION_TYPE={$3},$(vL.Toggle.HC) ,$4&amp;gt;}HC)&lt;BR /&gt;&lt;/STRONG&gt;so far it is working fine&lt;BR /&gt;but now I want to do a new logic inside the definition of this variable&lt;BR /&gt;I want to check if the value of the first parameter is 'actual' or 'budget' based on which there will be a new logic&lt;BR /&gt;I tried '$1' in an if condition but didn't seem to work&lt;BR /&gt;is there a way to accomplish this?&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2024 08:06:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Parameterized-variables/m-p/2495473#M102531</guid>
      <dc:creator>ali_hijazi</dc:creator>
      <dc:date>2024-12-02T08:06:03Z</dc:date>
    </item>
    <item>
      <title>Re: Parameterized variables</title>
      <link>https://community.qlik.com/t5/App-Development/Parameterized-variables/m-p/2495488#M102540</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/216"&gt;@ali_hijazi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is confusing what you are trying to do.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Given that you need to pass parameter 1 to variable you dont need to check what it is as you alerady know what you are passing as that parameter.&lt;/P&gt;
&lt;P&gt;You may want to explain it with some other example to help us understand.&lt;/P&gt;
&lt;P&gt;cheers&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2024 09:23:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Parameterized-variables/m-p/2495488#M102540</guid>
      <dc:creator>Lech_Miszkiewicz</dc:creator>
      <dc:date>2024-12-02T09:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: Parameterized variables</title>
      <link>https://community.qlik.com/t5/App-Development/Parameterized-variables/m-p/2495508#M102543</link>
      <description>&lt;P&gt;what I want to accomplish is the following:&lt;BR /&gt;when the value of the first parameter $1 is 'Actual' then&lt;BR /&gt;&lt;STRONG&gt;sum({&amp;lt;Scenario={$1},NMY={$2},AGGREGATION_TYPE={$3},$(vL.Toggle.HC) ,$4&amp;gt;}HC)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;otherwise&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;{&amp;lt;field1={'value'}&amp;gt;}&lt;BR /&gt;sum({&amp;lt;Scenario={$1},NMY={$2},AGGREGATION_TYPE={$3},$(vL.Toggle.HC) ,$4&amp;gt;}HC)&lt;BR /&gt;&lt;BR /&gt;I'm using this parameterized variable becuase it is used in several charts and I don't want to repeat the calculation expression and the condition in all charts but rather have it in one place&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2024 10:33:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Parameterized-variables/m-p/2495508#M102543</guid>
      <dc:creator>ali_hijazi</dc:creator>
      <dc:date>2024-12-02T10:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: Parameterized variables</title>
      <link>https://community.qlik.com/t5/App-Development/Parameterized-variables/m-p/2495522#M102545</link>
      <description>&lt;P&gt;You may try:&lt;/P&gt;
&lt;P&gt;{&amp;lt;field1={"$(=if($1 = 'Actual', 'value', '*'))"}&amp;gt;}&lt;BR /&gt;sum({&amp;lt;Scenario={$1},NMY={$2},AGGREGATION_TYPE={$3},$(vL.Toggle.HC) ,$4&amp;gt;}HC)&lt;/P&gt;
&lt;P&gt;In general should an if-query against a parameter be possible. Just check the if-logic at first without the parameter and afterwards the parameter is replaced by the condition-value.&lt;/P&gt;
&lt;P&gt;Another approach may be:&lt;/P&gt;
&lt;P&gt;{&amp;lt;field1={&lt;STRONG&gt;$5&lt;/STRONG&gt;}&amp;gt;}&lt;BR /&gt;sum({&amp;lt;Scenario={$1},NMY={$2},AGGREGATION_TYPE={$3},$(vL.Toggle.HC) ,$4&amp;gt;}HC)&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2024 11:25:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Parameterized-variables/m-p/2495522#M102545</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2024-12-02T11:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: Parameterized variables</title>
      <link>https://community.qlik.com/t5/App-Development/Parameterized-variables/m-p/2495674#M102565</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/28038"&gt;@marcus_sommer&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;it doesn't work as you suggested&lt;BR /&gt;if ($1 = 'actual'....&lt;BR /&gt;the editor gives an error&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2024 03:52:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Parameterized-variables/m-p/2495674#M102565</guid>
      <dc:creator>ali_hijazi</dc:creator>
      <dc:date>2024-12-03T03:52:09Z</dc:date>
    </item>
    <item>
      <title>Re: Parameterized variables</title>
      <link>https://community.qlik.com/t5/App-Development/Parameterized-variables/m-p/2495683#M102566</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/216"&gt;@ali_hijazi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Works for me:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Lech_Miszkiewicz_0-1733203471422.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/175114i712A3475E8E29229/image-size/large?v=v2&amp;amp;px=999" role="button" title="Lech_Miszkiewicz_0-1733203471422.png" alt="Lech_Miszkiewicz_0-1733203471422.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Lech_Miszkiewicz_1-1733203606290.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/175115i36AE3D0C153660D6/image-size/large?v=v2&amp;amp;px=999" role="button" title="Lech_Miszkiewicz_1-1733203606290.png" alt="Lech_Miszkiewicz_1-1733203606290.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As I said passing parameter you already know and have to pass anyway does not make sense to me as it adds more complexity, but at the end if you are happy with that approach here is a sample app.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Obviously to accomodate $1 in If() condition you need create another variable with that parameter so that it can obtain and pass down the parameter you are trying ot pass.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2024 05:29:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Parameterized-variables/m-p/2495683#M102566</guid>
      <dc:creator>Lech_Miszkiewicz</dc:creator>
      <dc:date>2024-12-03T05:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: Parameterized variables</title>
      <link>https://community.qlik.com/t5/App-Development/Parameterized-variables/m-p/2495692#M102568</link>
      <description>&lt;P&gt;It depends on how the parameter/variable is defined and called - both needs to be adjusted to each other. By defining the parameter like: $(v(Actual)) the call must be: '$1' - not mandatory within a set analysis because they expect a string and it's only necessary if the string contains spaces or special chars - but by using:&amp;nbsp;$(v('Actual')) the call could be just $1.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2024 07:03:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Parameterized-variables/m-p/2495692#M102568</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2024-12-03T07:03:18Z</dc:date>
    </item>
  </channel>
</rss>

