<?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: How to create a new field as below in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-create-a-new-field-as-below/m-p/737143#M475127</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why don't you use set analysis in your expressions for chart.&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Sol_Flag = {Reused,Created}&amp;gt;}sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The new line should be like :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(Sol_flag = 'Created' or Sol_flag = 'Reused', Sol_flag,null()) as Sol_flag1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another thing i observed is the case of your flag, you started with Sol_Flag and you are using as Sol_flag&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Angad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Aug 2014 06:02:47 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-08-08T06:02:47Z</dc:date>
    <item>
      <title>How to create a new field as below</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-a-new-field-as-below/m-p/737141#M475125</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;I'm using Sol_Flag as calculated dimension. It has three filters - Created, Reused and Updated. But I need values In Stacked Bar chart only for Created and Reused. If am using Cal dimension as =if ( Sol_flag =' Created' or 'Reused', Sol_flag, null()), QA will not pass. As QA person said better to avoid using Cal Dimension always. The other way is I should create a new field in script as below &lt;/P&gt;&lt;P&gt;=if ( Sol_flag =' Created' or 'Reused', Sol_flag, null()) as Sol_flag1. How to create this field in script. If am creating by keeping the Sol_flag as original and next line as new field, am getting error - Sol_flag field not found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please provide some insights on how to achieve this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in Advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Velan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Aug 2014 05:35:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-a-new-field-as-below/m-p/737141#M475125</guid>
      <dc:creator />
      <dc:date>2014-08-08T05:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a new field as below</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-a-new-field-as-below/m-p/737142#M475126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use set analysis, which is best possible solution either scripting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set analysis should be like,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= count(&lt;STRONG&gt;{&amp;lt;Sol_flag = {'Created','Reused'}&amp;gt;} &lt;/STRONG&gt;Column)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just select Dimension whatever you want. Go to Next and right expression as like above set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;depending on you KPI you can count or sum or whatever is your requirement,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have only shown one example. Bold one is set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-- Regards,&lt;/P&gt;&lt;P&gt;Vishal Waghole&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Aug 2014 06:01:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-a-new-field-as-below/m-p/737142#M475126</guid>
      <dc:creator>VishalWaghole</dc:creator>
      <dc:date>2014-08-08T06:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a new field as below</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-a-new-field-as-below/m-p/737143#M475127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why don't you use set analysis in your expressions for chart.&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Sol_Flag = {Reused,Created}&amp;gt;}sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The new line should be like :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(Sol_flag = 'Created' or Sol_flag = 'Reused', Sol_flag,null()) as Sol_flag1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another thing i observed is the case of your flag, you started with Sol_Flag and you are using as Sol_flag&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Angad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Aug 2014 06:02:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-a-new-field-as-below/m-p/737143#M475127</guid>
      <dc:creator />
      <dc:date>2014-08-08T06:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a new field as below</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-a-new-field-as-below/m-p/737144#M475128</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;During the load of the table containing Sol_Flag:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;if (Sol_flag =' Created' or Sol_flag = 'Reused', 1, 0) as Sol_flag1,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that Sol_Flag and Sol_flag are NOT the same; QV field names (and table names) are case sensitive.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Aug 2014 06:12:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-a-new-field-as-below/m-p/737144#M475128</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2014-08-08T06:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a new field as below</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-a-new-field-as-below/m-p/737145#M475129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in the script you can (example)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- copy the lines for Sol_flag creation and replace the Updated with null()&lt;/P&gt;&lt;P&gt; &lt;EM&gt;t:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; load&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; ...,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Dim1,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; if(Dim1='A', 'Created', if(Dim1='B', 'Reused', 'Updated')) as Sol_flag,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; if(Dim1='A', 'Created', if(Dim1='B', 'Reused', null())) as Sol_flag1 ,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; .............&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; Resident&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; sometable;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- or use preceding load (n load, from bottom)&lt;/P&gt;&lt;P&gt;&lt;EM&gt; t:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; load&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // second load, can use the fields of first load&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; *,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; if(match(Sol_flag, 'Created', 'Reused'), Sol_flag, null()) as Sol_flag1; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; load&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // first load&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; ...,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; Dim1,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; if(Dim1='A', 'Created', if(Dim1='B', 'Reused', 'Updated')) as Sol_flag,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ............&lt;/P&gt;&lt;P&gt;&lt;EM&gt; Resident&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; sometable;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Aug 2014 06:30:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-a-new-field-as-below/m-p/737145#M475129</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2014-08-08T06:30:27Z</dc:date>
    </item>
  </channel>
</rss>

