<?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: Filtering a Variable with a dimension value in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Filtering-a-Variable-with-a-dimension-value/m-p/1664169#M49961</link>
    <description>&lt;P&gt;Create your variable like below. Replace whatever modifier you want to add with $1,$2.....&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;sum({$&amp;lt;version_code={10},currency_conversion_type_id={1,2},time_calculation_code = {'YTD'},currency_code = {'EUR'},profit_center_code =- {1000}, adjust_code =- {'non-operating items'}, MonthNumber ={12},$1 &amp;gt;}[value_qty])/1000&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then you can pass the parameter within variable like below&lt;/P&gt;&lt;LI-CODE lang="python"&gt;=$(vActual_FY(PNL_long_Header = {'IAT'}))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 09 Jan 2020 16:24:04 GMT</pubDate>
    <dc:creator>Kushal_Chawda</dc:creator>
    <dc:date>2020-01-09T16:24:04Z</dc:date>
    <item>
      <title>Filtering a Variable with a dimension value</title>
      <link>https://community.qlik.com/t5/App-Development/Filtering-a-Variable-with-a-dimension-value/m-p/1664146#M49959</link>
      <description>&lt;P&gt;Hi Im Looking for a quicker way to filter a measure that is derived from a variable. rather than recreate the same measure based on filters.&lt;/P&gt;&lt;P&gt;i have a measure in a master item eg $(vActual_FY) that come from a variable&amp;nbsp;&lt;/P&gt;&lt;P&gt;the calculation in this variable is&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;sum({$&amp;lt;version_code={10},currency_conversion_type_id={1,2},time_calculation_code = {'YTD'},currency_code = {'EUR'},profit_center_code =- {1000}, adjust_code =- {'non-operating items'}, MonthNumber ={12} &amp;gt;}[value_qty])/1000&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;now i want to further filter this measure&amp;nbsp; &amp;nbsp;based on a value that exists in a dimension in certain circumstances&lt;/P&gt;&lt;LI-CODE lang="python"&gt;PNL_long_Header = {'IAT'}&lt;/LI-CODE&gt;&lt;P&gt;i guess i can create a new measure with the added filter, like below&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;sum({$&amp;lt;version_code={10},currency_conversion_type_id={1,2},time_calculation_code = {'YTD'},currency_code = {'EUR'},profit_center_code =- {1000}, adjust_code =- {'non-operating items'}, MonthNumber ={12},PNL_long_Header = {'IAT'} &amp;gt;}[value_qty])/1000&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;but i am&amp;nbsp; hoping there is an easier way&amp;nbsp; without replicating , where i can just call the Variable&amp;nbsp;$(vActual_FY)&amp;nbsp; and set the additional filter&amp;nbsp;&lt;/P&gt;&lt;P&gt;$(vActual_FY)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;something like&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;aggr($(vActual_FY),PNL_long_Header = {'IAT'})&lt;/LI-CODE&gt;&lt;P&gt;Any Ideas&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 03:37:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Filtering-a-Variable-with-a-dimension-value/m-p/1664146#M49959</guid>
      <dc:creator>anwarbham</dc:creator>
      <dc:date>2024-11-16T03:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering a Variable with a dimension value</title>
      <link>https://community.qlik.com/t5/App-Development/Filtering-a-Variable-with-a-dimension-value/m-p/1664155#M49960</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use argument inside a variable&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It will look like this:&amp;nbsp;&lt;SPAN&gt;$(vActual_FY(argument))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here is how you should change your measure (note the $1 at the end):&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;sum({$&amp;lt;version_code={10},currency_conversion_type_id={1,2},time_calculation_code = {'YTD'},currency_code = {'EUR'},profit_center_code =- {1000}, adjust_code =- {'non-operating items'}, MonthNumber ={12} $1 &amp;gt;}[value_qty])/1000&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want to trigger original value:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;$(vActual_FY(''))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If you want the new value:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;$(vActual_FY('PNL_long_Header = {'IAT'}'))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(you may need to escape the ' mark though)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I hope that helps!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Kind regards,&lt;BR /&gt;S.T.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2020 15:25:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Filtering-a-Variable-with-a-dimension-value/m-p/1664155#M49960</guid>
      <dc:creator>Stoyan_Terziev</dc:creator>
      <dc:date>2020-01-09T15:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering a Variable with a dimension value</title>
      <link>https://community.qlik.com/t5/App-Development/Filtering-a-Variable-with-a-dimension-value/m-p/1664169#M49961</link>
      <description>&lt;P&gt;Create your variable like below. Replace whatever modifier you want to add with $1,$2.....&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;sum({$&amp;lt;version_code={10},currency_conversion_type_id={1,2},time_calculation_code = {'YTD'},currency_code = {'EUR'},profit_center_code =- {1000}, adjust_code =- {'non-operating items'}, MonthNumber ={12},$1 &amp;gt;}[value_qty])/1000&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then you can pass the parameter within variable like below&lt;/P&gt;&lt;LI-CODE lang="python"&gt;=$(vActual_FY(PNL_long_Header = {'IAT'}))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2020 16:24:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Filtering-a-Variable-with-a-dimension-value/m-p/1664169#M49961</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-01-09T16:24:04Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering a Variable with a dimension value</title>
      <link>https://community.qlik.com/t5/App-Development/Filtering-a-Variable-with-a-dimension-value/m-p/1664171#M49962</link>
      <description>&lt;P&gt;thanks this works perfect i just added the comma after the argument&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;sum({$&amp;lt;version_code={10},currency_conversion_type_id={1,2},time_calculation_code = {'YTD'},currency_code = {'EUR'},profit_center_code =- {1000}, adjust_code =- {'non-operating items'}, MonthNumber ={12} , $1 &amp;gt;}[value_qty])/1000&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;and called it via&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;$(vActual_FY(''))&lt;/LI-CODE&gt;&lt;P&gt;and with a filter&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;$(vActual_FY(PNL_long_Header = {'IAT'}))&lt;/LI-CODE&gt;&lt;P&gt;many thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2020 16:28:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Filtering-a-Variable-with-a-dimension-value/m-p/1664171#M49962</guid>
      <dc:creator>anwarbham</dc:creator>
      <dc:date>2020-01-09T16:28:04Z</dc:date>
    </item>
  </channel>
</rss>

