<?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: Create new field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Create-new-field/m-p/1730945#M722472</link>
    <description>&lt;P&gt;hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;in your expression only QB will be in group2 all other will be in Group1&amp;nbsp;&lt;/P&gt;&lt;P&gt;the way the if function works is that when the first condition is met the second will not be evaluated&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 27 Jul 2020 07:00:13 GMT</pubDate>
    <dc:creator>lironbaram</dc:creator>
    <dc:date>2020-07-27T07:00:13Z</dc:date>
    <item>
      <title>Create new field</title>
      <link>https://community.qlik.com/t5/QlikView/Create-new-field/m-p/1730934#M722471</link>
      <description>&lt;P&gt;Hi All ,&lt;/P&gt;&lt;P&gt;Iam new to Qlik .&lt;/P&gt;&lt;P&gt;Require your help on this .&lt;/P&gt;&lt;P&gt;I have field called "axis" which has values as EA, EB,QW,QE,QR,QT&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want new field from axis field called as Groupaxis which will have 2 values as Group1 and Group2&lt;/P&gt;&lt;P&gt;Condition: if EA,QW,QE,QR,QT then call Group1 and if EB,QW,QE,QR,QT then call Group2&lt;/P&gt;&lt;P&gt;I tried&amp;nbsp;&lt;/P&gt;&lt;P&gt;if(match(axis,'EA','QW','QE','QR','QT') ,'Group1'&lt;BR /&gt;,&lt;BR /&gt;if(match(axis,'EB,'QW','QE','QR','QT') ,'Group2') )as Groupaxis&lt;/P&gt;&lt;P&gt;But when i refresh i get only group1 value in the field Groupaxis . Not sure what i'm doing wrong or let me know other ways if possible .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Advance Thanks&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 00:15:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-new-field/m-p/1730934#M722471</guid>
      <dc:creator>Ramsingh</dc:creator>
      <dc:date>2024-11-16T00:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: Create new field</title>
      <link>https://community.qlik.com/t5/QlikView/Create-new-field/m-p/1730945#M722472</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;in your expression only QB will be in group2 all other will be in Group1&amp;nbsp;&lt;/P&gt;&lt;P&gt;the way the if function works is that when the first condition is met the second will not be evaluated&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jul 2020 07:00:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-new-field/m-p/1730945#M722472</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2020-07-27T07:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: Create new field</title>
      <link>https://community.qlik.com/t5/QlikView/Create-new-field/m-p/1730965#M722473</link>
      <description>&lt;P&gt;You cannot assign values like 'QW' to both Group1 and Group2, so it will only be assigned to the first one in the If(). You may need a different data structure such as two flag fields for Group1 and 2:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if(match(axis,'EA','QW','QE','QR','QT'), 1, 0) as Group1Flag,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;if(match(axis,'EB,'QW','QE','QR','QT'), 1, 0) as Group2Flag,&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jul 2020 08:37:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-new-field/m-p/1730965#M722473</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2020-07-27T08:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: Create new field</title>
      <link>https://community.qlik.com/t5/QlikView/Create-new-field/m-p/1730969#M722474</link>
      <description>&lt;P&gt;I order to get a field value to be associated with multiple you have two approaches.&lt;/P&gt;&lt;P&gt;1. Duplicate the transactions for the transactions containing QW QE QR and QT. Like this.&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;Data:
LOAD 
   Group,
  'Group1' as  Groupaxis
From Source
Where match(axis,'EA','QW','QE','QR','QT');
LOAD 
   Group,
  'Group1' as  Groupaxis
From Source
Where match(axis,'EB,'QW','QE','QR','QT');

//If you have transactions without Groupaxis then add the rest not matching
LOAD 
   Group,
  'Group1' as  Groupaxis
From Source
Where NOT match(axis,'EA','EB,'QW','QE','QR','QT');&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Create a dimension table associating Group to one or more dimension.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Data:
LOAD 
  *, 
  Group as %group 
From 
  Source;

[Group axis]:
LOAD * INLINE [
Group, Groupaxis
EA, Group1
QW, Group1
QE, Group1
QR, Group1
QT, Group1
EB, Group2
QW, Group2
QE, Group2
QR, Group2
QT, Group2
];&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Without knowing your scenario I would recommend you to start considering alternative 2.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jul 2020 08:46:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-new-field/m-p/1730969#M722474</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2020-07-27T08:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: Create new field</title>
      <link>https://community.qlik.com/t5/QlikView/Create-new-field/m-p/1734938#M722475</link>
      <description>&lt;P&gt;You have received a few responses, we would greatly appreciate it if you would return to the thread to review those and if any of them assist in solving your use case, please use the Accept as Solution button to mark the one(s) that helped, and if you did something different, you can post what you did and then mark that post afterward using the button.&amp;nbsp; Marking things gives the posters credit for the assistance and lets the other Members know what worked.&lt;/P&gt;&lt;P&gt;Here is Help link on Match as well:&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Scripting/ConditionalFunctions/match.htm" target="_blank"&gt;https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/Scripting/ConditionalFunctions/match.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 17:28:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-new-field/m-p/1734938#M722475</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2020-08-11T17:28:26Z</dc:date>
    </item>
  </channel>
</rss>

