<?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: Dynamically switching which field is being used in a filter in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Dynamically-switching-which-field-is-being-used-in-a-filter/m-p/1945183#M77894</link>
    <description>&lt;P&gt;A couple of thoughts. Since you have already created the string in the variable, you wouldn't use MinString.&amp;nbsp; But you don't really need the variable at all. Just go with using the Dim field.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;=$(=MaxString(Dim))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 17 Jun 2022 17:57:23 GMT</pubDate>
    <dc:creator>rwunderlich</dc:creator>
    <dc:date>2022-06-17T17:57:23Z</dc:date>
    <item>
      <title>Dynamically switching which field is being used in a filter</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamically-switching-which-field-is-being-used-in-a-filter/m-p/1944277#M77812</link>
      <description>&lt;P&gt;Wondering if this is possible.&lt;/P&gt;
&lt;P&gt;I've got a little data island with two values - Monthly and Weekly, and two fields in the fact table called Month-Year and Week-Year.&lt;/P&gt;
&lt;P&gt;Depending on what the user selects (Monthly or Weekly), I'd like a filter on the page to switch between displaying values for the Month-Year field or the Week-Year field.&lt;/P&gt;
&lt;P&gt;I've tried creating a variable that returns the string 'Month-Year' and 'Week-Year' and using that variable in the filter's dimension definition, but that doesn't work. Any ideas?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 00:00:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamically-switching-which-field-is-being-used-in-a-filter/m-p/1944277#M77812</guid>
      <dc:creator>mhassinger</dc:creator>
      <dc:date>2022-06-16T00:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically switching which field is being used in a filter</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamically-switching-which-field-is-being-used-in-a-filter/m-p/1944317#M77815</link>
      <description>&lt;P&gt;It should work if you wrap your Dim field reference in a $() like&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;=$(=MinString(Dim))&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;-Rob&lt;BR /&gt;&lt;A href="http://www.easyqlik.com" target="_blank"&gt;http://www.easyqlik.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://masterssummit.com" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://qlikviewcookbook.com" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 03:35:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamically-switching-which-field-is-being-used-in-a-filter/m-p/1944317#M77815</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2022-06-16T03:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically switching which field is being used in a filter</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamically-switching-which-field-is-being-used-in-a-filter/m-p/1944347#M77819</link>
      <description>&lt;P&gt;To do Rob's solution I think you need to rename or associate your 'Monthly' and 'Weekly' values to 'Month-Year' and&amp;nbsp; 'Week-Year' .&lt;/P&gt;
&lt;P&gt;Let's say you have this:&lt;/P&gt;
&lt;P&gt;GUI:&lt;/P&gt;
&lt;P&gt;LOAD * INLINE [&lt;/P&gt;
&lt;P&gt;Period, Dim&lt;/P&gt;
&lt;P&gt;Monthly, Month-Year&lt;/P&gt;
&lt;P&gt;Weekly,Week-Year];&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ApplicationData:&lt;/P&gt;
&lt;P&gt;Load * From TransaktionData;&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you should be able to use Rob's suggested technique. Making selections in [Period] and displaying the field name found in the associated [Dim] field.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;=[$(=MinString(Dim))]&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 06:17:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamically-switching-which-field-is-being-used-in-a-filter/m-p/1944347#M77819</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2022-06-16T06:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically switching which field is being used in a filter</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamically-switching-which-field-is-being-used-in-a-filter/m-p/1944656#M77848</link>
      <description>&lt;P&gt;Thank you both for the input. I must still be missing something because it doesn't work.&lt;/P&gt;
&lt;P&gt;Here's my inline table load for the data island.&lt;/P&gt;
&lt;P&gt;TimeSelect:&lt;BR /&gt;Load * Inline&lt;BR /&gt;[&lt;BR /&gt;Monthly or Weekly, Dim&lt;BR /&gt;Monthly, Month-Year&lt;BR /&gt;Weekly, Week-Year&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;Here is my variable definition for vTimeFrame.&lt;/P&gt;
&lt;P&gt;if(Only([Monthly or Weekly]) = 'Monthly', 'Month-Year','Week-Year')&lt;/P&gt;
&lt;P&gt;That seems to work fine because $(vTimeFrame) in a text &amp;amp; Image object evaluates it correctly to one of the two strings.&lt;BR /&gt;&lt;BR /&gt;Finally in my filter pane dimension field expression I have what Rob proposed:&lt;BR /&gt;&lt;BR /&gt;=$(=MinString(vTimeFrame))&lt;BR /&gt;&lt;BR /&gt;I must just be misunderstanding something.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 14:58:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamically-switching-which-field-is-being-used-in-a-filter/m-p/1944656#M77848</guid>
      <dc:creator>mhassinger</dc:creator>
      <dc:date>2022-06-16T14:58:58Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically switching which field is being used in a filter</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamically-switching-which-field-is-being-used-in-a-filter/m-p/1944659#M77850</link>
      <description>&lt;P&gt;Try using&amp;nbsp; this as a dimension.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;[&lt;/STRONG&gt;$(vTimeFrame)&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 15:03:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamically-switching-which-field-is-being-used-in-a-filter/m-p/1944659#M77850</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2022-06-16T15:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically switching which field is being used in a filter</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamically-switching-which-field-is-being-used-in-a-filter/m-p/1944716#M77856</link>
      <description>&lt;P&gt;No go. It actually gives me a invalid dimension error when I do that. With '&lt;SPAN&gt;=$(=MinString(vTimeFrame))' the filter pane was empty but it didn't give an error.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 17:09:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamically-switching-which-field-is-being-used-in-a-filter/m-p/1944716#M77856</guid>
      <dc:creator>mhassinger</dc:creator>
      <dc:date>2022-06-16T17:09:23Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically switching which field is being used in a filter</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamically-switching-which-field-is-being-used-in-a-filter/m-p/1945183#M77894</link>
      <description>&lt;P&gt;A couple of thoughts. Since you have already created the string in the variable, you wouldn't use MinString.&amp;nbsp; But you don't really need the variable at all. Just go with using the Dim field.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;=$(=MaxString(Dim))&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 17:57:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamically-switching-which-field-is-being-used-in-a-filter/m-p/1945183#M77894</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2022-06-17T17:57:23Z</dc:date>
    </item>
  </channel>
</rss>

