<?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: Dynamic field selection using multiple criteria in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Dynamic-field-selection-using-multiple-criteria/m-p/811793#M286534</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you create a field "Currency" through&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Load * inline&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Currency&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EURO&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOCAL];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and define a variable vCurrency through&lt;/P&gt;&lt;P&gt;&amp;nbsp; '=Only(Currency)'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then you can use the following formulas&lt;/P&gt;&lt;P&gt;&amp;nbsp; =Sum(SALES_$(&lt;SPAN style="font-size: 13.3333330154419px;"&gt;vCurrency&lt;/SPAN&gt;))&lt;/P&gt;&lt;P&gt;&amp;nbsp; =Sum(RETURN_$(&lt;SPAN style="font-size: 13.3333330154419px;"&gt;vCurrency&lt;/SPAN&gt;))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See more on &lt;A href="https://community.qlik.com/qlik-blogpost/3406"&gt;The Magic of Variables&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Mar 2015 14:35:54 GMT</pubDate>
    <dc:creator>hic</dc:creator>
    <dc:date>2015-03-16T14:35:54Z</dc:date>
    <item>
      <title>Dynamic field selection using multiple criteria</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-field-selection-using-multiple-criteria/m-p/811792#M286533</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 need to give user possibility to select all calculated figures in two different currencies. In my case it will be a local currency and euro. Now i already have columns where local and euro values are calculated e.g. Sales_LOCAL, Returns_Local, Return_Euro and Sales_EURO. I need to give user the possibility to select between euro and local in a selection box and according to the selection select the field. Problem is very easy if there are only two columns but in this case if have more then two column so i need to select a dynamic filed name using multiple criteria.&lt;/P&gt;&lt;P&gt;I created a island table like this&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Field Name&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Currency&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;SALES_LOCAL&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;LOCAL&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;SALES_EURO&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;EURO&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;RETURN_LOCAL&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;LOCAL &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;RETURN_EURO&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;EURO&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;So user can select local or euro. but i am not able so write the dynamic field name e.g. &lt;/P&gt;&lt;P&gt;if user select LOCAL i need to calculate SUM(SALES_LOCAL) , SUM(RETURN_LOCAL)&amp;nbsp; etc. and if user select EURO then &lt;SPAN style="font-size: 13.3333330154419px;"&gt;SUM(SALES_EURO) ,&amp;nbsp; SUM(RETURN_EURO) etc. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I hope you guys must have a trick to solve it i am hanged in here. &lt;/P&gt;&lt;P&gt;Thank you very much in advance for you help. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2015 14:26:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-field-selection-using-multiple-criteria/m-p/811792#M286533</guid>
      <dc:creator />
      <dc:date>2015-03-16T14:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic field selection using multiple criteria</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-field-selection-using-multiple-criteria/m-p/811793#M286534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you create a field "Currency" through&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Load * inline&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Currency&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EURO&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOCAL];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and define a variable vCurrency through&lt;/P&gt;&lt;P&gt;&amp;nbsp; '=Only(Currency)'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then you can use the following formulas&lt;/P&gt;&lt;P&gt;&amp;nbsp; =Sum(SALES_$(&lt;SPAN style="font-size: 13.3333330154419px;"&gt;vCurrency&lt;/SPAN&gt;))&lt;/P&gt;&lt;P&gt;&amp;nbsp; =Sum(RETURN_$(&lt;SPAN style="font-size: 13.3333330154419px;"&gt;vCurrency&lt;/SPAN&gt;))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See more on &lt;A href="https://community.qlik.com/qlik-blogpost/3406"&gt;The Magic of Variables&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2015 14:35:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-field-selection-using-multiple-criteria/m-p/811793#M286534</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2015-03-16T14:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic field selection using multiple criteria</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-field-selection-using-multiple-criteria/m-p/811794#M286535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sameer, this can be done in several ways, to tell the two I most use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;first way:&lt;/P&gt;&lt;P&gt;create variables for sales, return... and use it in expressions, ie, for sales:&lt;/P&gt;&lt;P&gt;SET vSales = "=If(CurrencyField='EURO', '[SALES_EURO]', '[SALES_LOCAL]')"&lt;/P&gt;&lt;P&gt;Then you can use expressions like: Sum($(vSales))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This can be done without variables but if you add another currency it will save you a lot of time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second way:&lt;/P&gt;&lt;P&gt;Using $-expansion to crete the field name:&lt;/P&gt;&lt;P&gt;Sum([SALES_$(CurrencyField)]) or Sum([SALES_$(=CurrencyField)]) --&amp;gt; It will expand to Sum([SALES_EURO]) or Sum([SALES_LOCAL]) depending on the value selected in CurrencyField&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2015 14:41:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-field-selection-using-multiple-criteria/m-p/811794#M286535</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-03-16T14:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic field selection using multiple criteria</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-field-selection-using-multiple-criteria/m-p/811795#M286536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OR you could created 2 charts, one for local and a second for euro, create a variable that's set from a button, then use a conditional show, see the attached example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2015 14:45:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-field-selection-using-multiple-criteria/m-p/811795#M286536</guid>
      <dc:creator>awhitfield</dc:creator>
      <dc:date>2015-03-16T14:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic field selection using multiple criteria</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-field-selection-using-multiple-criteria/m-p/811796#M286537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks this is exactly what i was looking for.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2015 15:00:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-field-selection-using-multiple-criteria/m-p/811796#M286537</guid>
      <dc:creator />
      <dc:date>2015-03-16T15:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic field selection using multiple criteria</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-field-selection-using-multiple-criteria/m-p/811797#M286538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your formula works fine but it is marked as error formula. Have a look at attached screenshot. Is it a bug in QV?&lt;IMG __jive_id="80861" alt="BUG in QV.JPG" class="image-1 jive-image" src="/legacyfs/online/80861_BUG in QV.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2015 15:09:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-field-selection-using-multiple-criteria/m-p/811797#M286538</guid>
      <dc:creator />
      <dc:date>2015-03-16T15:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic field selection using multiple criteria</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-field-selection-using-multiple-criteria/m-p/811798#M286539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, it happens when you build a field name like this, tha'ts one backward of using this approach, you lost intellisense (or whatever name it has in QV).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For debug in complicated expressions you can replace (CTRL+F) all $(vcurrency) for EURO (be sure there is no other 'EURO' string in the expression), debug expression and revert the replacing when it's debbugged (replacing EURO for $(vcurrency))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2015 15:16:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-field-selection-using-multiple-criteria/m-p/811798#M286539</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-03-16T15:16:45Z</dc:date>
    </item>
  </channel>
</rss>

