<?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? in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Creating-a-new-field/m-p/1792727#M62041</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/137641"&gt;@jeni_404&lt;/a&gt;&amp;nbsp;, Create new fields is a thing to do at load editor lever (script). Assuming that all fields are in the same table.&lt;/P&gt;&lt;P&gt;For example :&lt;/P&gt;&lt;P&gt;Data:&lt;BR /&gt;Load&lt;BR /&gt;Id,&lt;BR /&gt;A,&lt;BR /&gt;B,&lt;BR /&gt;[morefields]&lt;BR /&gt;FROM [YourLib and Data Source];&lt;/P&gt;&lt;P&gt;Result:&lt;BR /&gt;Load&lt;BR /&gt;Id,&lt;BR /&gt;sum(A) as C,&lt;BR /&gt;sum(B) as B_Sum,&lt;BR /&gt;sum(A) / sum(B) as D&lt;BR /&gt;Resident Data&lt;BR /&gt;group By Id;&lt;/P&gt;&lt;P&gt;//Then in yor chart expression you can use :&lt;BR /&gt;sum(D) //or&lt;BR /&gt;sum(C) / sum(B_Sum)&lt;/P&gt;</description>
    <pubDate>Fri, 19 Mar 2021 01:50:07 GMT</pubDate>
    <dc:creator>QFabian</dc:creator>
    <dc:date>2021-03-19T01:50:07Z</dc:date>
    <item>
      <title>Creating a new field?</title>
      <link>https://community.qlik.com/t5/App-Development/Creating-a-new-field/m-p/1792700#M62037</link>
      <description>&lt;P&gt;Hello, I've just picked up Qlik Sense this past month and need help with creating a new field. At the simplest level, I want to create a field called C which is basically just Sum(A). I want to build on this and then create a new field called D which is C/Sum(B). As of right now, I can't even figure out how to create C as a field. I'm just trying to add it as a measure in several graphs/tables.&lt;BR /&gt;&lt;BR /&gt;I've been able to create new Master Items with limited success, but every attempt at adding in these simple calculations into the data load editor have been met with errors. I've tried coding in all of the different ways mentioned on other similar answered questions on here but haven't had luck with any of them. Am I supposed to edit directly in the main script, or create a new section exclusively for field creation? And do new fields automatically show up in the data model viewer?&lt;/P&gt;&lt;P&gt;Any help would be appreciated!&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 00:24:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Creating-a-new-field/m-p/1792700#M62037</guid>
      <dc:creator>jeni_404</dc:creator>
      <dc:date>2024-11-16T00:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a new field?</title>
      <link>https://community.qlik.com/t5/App-Development/Creating-a-new-field/m-p/1792727#M62041</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/137641"&gt;@jeni_404&lt;/a&gt;&amp;nbsp;, Create new fields is a thing to do at load editor lever (script). Assuming that all fields are in the same table.&lt;/P&gt;&lt;P&gt;For example :&lt;/P&gt;&lt;P&gt;Data:&lt;BR /&gt;Load&lt;BR /&gt;Id,&lt;BR /&gt;A,&lt;BR /&gt;B,&lt;BR /&gt;[morefields]&lt;BR /&gt;FROM [YourLib and Data Source];&lt;/P&gt;&lt;P&gt;Result:&lt;BR /&gt;Load&lt;BR /&gt;Id,&lt;BR /&gt;sum(A) as C,&lt;BR /&gt;sum(B) as B_Sum,&lt;BR /&gt;sum(A) / sum(B) as D&lt;BR /&gt;Resident Data&lt;BR /&gt;group By Id;&lt;/P&gt;&lt;P&gt;//Then in yor chart expression you can use :&lt;BR /&gt;sum(D) //or&lt;BR /&gt;sum(C) / sum(B_Sum)&lt;/P&gt;</description>
      <pubDate>Fri, 19 Mar 2021 01:50:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Creating-a-new-field/m-p/1792727#M62041</guid>
      <dc:creator>QFabian</dc:creator>
      <dc:date>2021-03-19T01:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a new field?</title>
      <link>https://community.qlik.com/t5/App-Development/Creating-a-new-field/m-p/1792734#M62042</link>
      <description>&lt;P&gt;Thanks for the response!&lt;/P&gt;&lt;P&gt;The letters were just place holders for my field names, I realized it might be helpful if I showed what I have so far. Here's the part of the load editor script that's giving me trouble, lines 39 and 40 are both erroring when I try to create the new fields, but lines 34-36 work just fine creating them using the 'as' assigner. Also I think I'm a little confused by the difference between the "Data" and "Result" codes you wrote, are these supposed to go in two separate places within the script? And what does the "Id" line do? I tried adding this into my script as well but was met with another error.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="QS question.PNG" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/51438iD5939C31A220B59D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="QS question.PNG" alt="QS question.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Mar 2021 02:42:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Creating-a-new-field/m-p/1792734#M62042</guid>
      <dc:creator>jeni_404</dc:creator>
      <dc:date>2021-03-19T02:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a new field?</title>
      <link>https://community.qlik.com/t5/App-Development/Creating-a-new-field/m-p/1792735#M62043</link>
      <description>&lt;P&gt;When You have aggregation in&amp;nbsp; your load, You need to put&amp;nbsp;&lt;SPAN&gt;group By&amp;nbsp;.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So, after use your load without&amp;nbsp; 39 and 40 lines, you can create another table using resident command, to use the data previously loaded.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;//Example:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Result:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Load&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;OrderID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;sum(Cost) as Margin,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;sum(Cost) / sum(Sales) as MarginPercent&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Resident Data// table label líne 26&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;group By&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;OrderID;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Mar 2021 03:55:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Creating-a-new-field/m-p/1792735#M62043</guid>
      <dc:creator>QFabian</dc:creator>
      <dc:date>2021-03-19T03:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a new field?</title>
      <link>https://community.qlik.com/t5/App-Development/Creating-a-new-field/m-p/1792737#M62045</link>
      <description>&lt;P&gt;as&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/121051"&gt;@QFabian&lt;/a&gt;&amp;nbsp;said, if you use Sum() in your load, you will need to add Group By. However, in this case I don't think you want or need Sum. You only have one Cost&amp;nbsp; and Sales value per row. I think lines 39 &amp;amp; 40 should be:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Sales - Cost as Margin,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Cost / Sales - 1&amp;nbsp; as MarginPercent,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;</description>
      <pubDate>Fri, 19 Mar 2021 04:17:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Creating-a-new-field/m-p/1792737#M62045</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2021-03-19T04:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a new field?</title>
      <link>https://community.qlik.com/t5/App-Development/Creating-a-new-field/m-p/1792956#M62077</link>
      <description>&lt;P&gt;Ah ok both of these solutions work for me now, thank you so much!&lt;/P&gt;</description>
      <pubDate>Fri, 19 Mar 2021 15:50:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Creating-a-new-field/m-p/1792956#M62077</guid>
      <dc:creator>jeni_404</dc:creator>
      <dc:date>2021-03-19T15:50:32Z</dc:date>
    </item>
  </channel>
</rss>

