<?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 change Straight table Expression in to Script logic by getting same result ? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-change-Straight-table-Expression-in-to-Script-logic-by/m-p/1336487#M830237</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;May i Know how the above logic Exactly work.can you Show me with Sample Data Set&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I did attach the sample you attached in my response... did you get to check it out? I mean the logic is simple&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am doing this&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;TGB_Counts/Previous(TGB_Counts) - 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;which is saying&lt;/P&gt;&lt;P&gt;Divide the current row of TGB_Counts with the previous row of TGB_Counts and subtract 1 from it. Just like you did this on the front end.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does that make sense?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Jun 2017 11:13:11 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2017-06-22T11:13:11Z</dc:date>
    <item>
      <title>How to change Straight table Expression in to Script logic by getting same result ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-change-Straight-table-Expression-in-to-Script-logic-by/m-p/1336484#M830234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a Straight table like Below . And i have got the average like Below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The Business Formula to Calculate Average:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;(Today-Previous day)/Previous day * 100&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Screenshot_1.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/167671_Screenshot_1.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 10pt;"&gt;The Expression to Calculate Average:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;=Num((Sum(TGB_Counts)/Above(Sum({&amp;lt;Date&amp;gt;}TGB_Counts)) - 1) * Avg(1),'#,##0.00')&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;(The Expression is based on Above Business Formula)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Note: Now iam getting Correct Average,&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;But My Business Sudden Request is to bring the above Average Expression logic in Script&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;Is there any way to get the above expression logic in Script So that i Dont Want to Perform Expression&amp;nbsp; to Get Average. I can easily add Average as Dimension in Table Box Instead of Straight table&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I Need above expression as Script Logic&amp;nbsp; so that i will get Average as a field and i can add it as Dimension in Script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: The Script logic output must be same like Above Straight table expression average values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am Searching a solution for it. kindly Help me out of this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Find the attached Qvw and&amp;nbsp; Excel Data for your Referance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Muthukumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-change-Straight-table-Expression-in-to-Script-logic-by/m-p/1336484#M830234</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to change Straight table Expression in to Script logic by getting same result ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-change-Straight-table-Expression-in-to-Script-logic-by/m-p/1336485#M830235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sheet1:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD [TGB Name], &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date as Date_Text,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Left(Date, 10) as Date,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TGB_Counts&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Pos.xlsx]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(ooxml, embedded labels, table is Sheet1);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FinalTable:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Num(If([TGB Name] = Previous([TGB Name]), TGB_Counts/Previous(TGB_Counts) - 1), '#.00') as Average&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Sheet1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Order By [TGB Name], Date;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Table Sheet1;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jun 2017 17:08:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-change-Straight-table-Expression-in-to-Script-logic-by/m-p/1336485#M830235</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-06-21T17:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to change Straight table Expression in to Script logic by getting same result ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-change-Straight-table-Expression-in-to-Script-logic-by/m-p/1336486#M830236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you So much Sunny . May i Know how the above logic Exactly work.can you Show me with Sample Data Set&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because i dont Know how it Exactly Works. i can Under Stand up to below Step&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;Num(If([TGB Name] = Previous([TGB Name]), TGB_Counts/Previous(TGB_Counts)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;i cant understand the -1 part and How it gets with the below Formula&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;The Business Formula to Calculate Average:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(Today-Previous day)/Previous day * 100&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;Can You Please Explain Me the Logic Behind it So that it will be help full for my Learning process&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;Thanks,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;Muthukumar&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jun 2017 22:41:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-change-Straight-table-Expression-in-to-Script-logic-by/m-p/1336486#M830236</guid>
      <dc:creator />
      <dc:date>2017-06-21T22:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to change Straight table Expression in to Script logic by getting same result ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-change-Straight-table-Expression-in-to-Script-logic-by/m-p/1336487#M830237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;May i Know how the above logic Exactly work.can you Show me with Sample Data Set&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I did attach the sample you attached in my response... did you get to check it out? I mean the logic is simple&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am doing this&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;TGB_Counts/Previous(TGB_Counts) - 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;which is saying&lt;/P&gt;&lt;P&gt;Divide the current row of TGB_Counts with the previous row of TGB_Counts and subtract 1 from it. Just like you did this on the front end.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does that make sense?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jun 2017 11:13:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-change-Straight-table-Expression-in-to-Script-logic-by/m-p/1336487#M830237</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-06-22T11:13:11Z</dc:date>
    </item>
  </channel>
</rss>

