<?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: Creating a new field from expression and passing value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Creating-a-new-field-from-expression-and-passing-value/m-p/93865#M604090</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Valuelist() values are not fields and so they cannot be selected. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Sep 2018 10:24:59 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2018-09-05T10:24:59Z</dc:date>
    <item>
      <title>Creating a new field from expression and passing value</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-new-field-from-expression-and-passing-value/m-p/93863#M604088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a created a simple listbox called Views by writing this expression : &lt;/P&gt;&lt;P&gt;=ValueList('a','b') &lt;/P&gt;&lt;P&gt;Basically, I want tp pass the selection to another field to do calculations. ie if a is selected then I should be able to refer to it from another expression by writing something like:&lt;/P&gt;&lt;P&gt;if(view = a, sum(sales), if(view = b, cost,null))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any guidance would be more than appreciated.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aksel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2018 09:46:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-new-field-from-expression-and-passing-value/m-p/93863#M604088</guid>
      <dc:creator>aetingu12</dc:creator>
      <dc:date>2018-09-05T09:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a new field from expression and passing value</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-new-field-from-expression-and-passing-value/m-p/93864#M604089</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;Check this link.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-9013"&gt;Missing Manual - ValueLoop() &amp;amp;amp; ValueList()&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2018 09:55:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-new-field-from-expression-and-passing-value/m-p/93864#M604089</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2018-09-05T09:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a new field from expression and passing value</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-new-field-from-expression-and-passing-value/m-p/93865#M604090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Valuelist() values are not fields and so they cannot be selected. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2018 10:24:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-new-field-from-expression-and-passing-value/m-p/93865#M604090</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2018-09-05T10:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a new field from expression and passing value</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-new-field-from-expression-and-passing-value/m-p/93866#M604091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.qlik.com/qlik-users/242903"&gt;aetingu12&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I understand right, you want to change a field in your calculation based on a listbox selection (correct me if I am wrong).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can achieve it in another way. Use a inline load with selections you want to do as follows:&lt;/P&gt;&lt;P&gt;1.&lt;/P&gt;&lt;P&gt;CalcSwitch:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Load * inline&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;[&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;%ColLabel,%ColName&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;'a','&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;sum(sales)&lt;/SPAN&gt;'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;'b','&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;cost&lt;/SPAN&gt;'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;2. Use %ColLabel in a listbox. You will be using this to change your calculation selection.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;3. In calculation use the following:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;$(=%ColName)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;This will change the calculation based on your selection as per what you mention in the inline table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Rajiv.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2018 10:35:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-new-field-from-expression-and-passing-value/m-p/93866#M604091</guid>
      <dc:creator>rajivmeher</dc:creator>
      <dc:date>2018-09-05T10:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a new field from expression and passing value</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-new-field-from-expression-and-passing-value/m-p/93867#M604092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Much appreciated. Exactly what I wanted to do! Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2018 11:00:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-new-field-from-expression-and-passing-value/m-p/93867#M604092</guid>
      <dc:creator>aetingu12</dc:creator>
      <dc:date>2018-09-05T11:00:20Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a new field from expression and passing value</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-new-field-from-expression-and-passing-value/m-p/93868#M604093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aksel ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Value List can be used only to create synthetic dimension, But even if u want it to get it such way means. you can create a field from your Scriptside using match function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_15361467828575031 jive_text_macro" jivemacro_uid="_15361467828575031"&gt;
&lt;P&gt;=If(MATCH(Customer,'A-2-Z Solutions','Aadast'),'A',&lt;/P&gt;
&lt;P&gt;If(MATCH(Customer,'A Superior System','A&amp;amp;R Partners'),'B','Other'))&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Hirish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2018 11:26:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-new-field-from-expression-and-passing-value/m-p/93868#M604093</guid>
      <dc:creator>HirisH_V7</dc:creator>
      <dc:date>2018-09-05T11:26:47Z</dc:date>
    </item>
  </channel>
</rss>

