<?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: Straight Table - Comparison with Baseline in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Straight-Table-Comparison-with-Baseline/m-p/1338477#M833382</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It sounds like something that you could accomplish using alternate states.&amp;nbsp; Can you send a screen shot of what you are looking to accomplish?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Jun 2017 17:52:33 GMT</pubDate>
    <dc:creator>oscar_ortiz</dc:creator>
    <dc:date>2017-06-08T17:52:33Z</dc:date>
    <item>
      <title>Straight Table - Comparison with Baseline</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-Comparison-with-Baseline/m-p/1338475#M833380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a Qlikview problem that I need to solve.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table1 with has a pagename, date, position and pageviews.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have another table2&amp;nbsp; which is the baseline table which has the baselineposition, avg.pageviews&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to create a straight table which has the pagename, avg(position) as int, avg(pageviews) [all from table1] and then get the baseline avg. pageviews from table2 corresponding to avg(position) calculated from table1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bharath.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Update: Added sample data and desired result straight table. hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: bharath radhakrishnan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The solution provided by Oscar shows the correct number but the expression is blank when I open the dashboard in qlikview or in the web. It shows the numbers only when I refresh the dashboard. Any help is greatly appreciated. Attached the qlikview and source data excel files. Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Update2:&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Found the solution!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I dont know why...but the issue seems to be with the FieldIndex function and not the FieldValue function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;So this is what I did.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;In my query I sorted the baseline table by baseline position (ascending) and then I changed my calcuation to&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13px;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;FieldValue( 'baselineimpressions', Round( Avg( position ) ) )&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13px;"&gt;This worked all the time and also showed the values when I accessed it in Access Point through my browser.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13px;"&gt;P.S.: I am still curious to find out why the FieldIndex didnt work with a calculation. It worked when I just hardcored an integer like &lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;FieldValue( 'baselineimpressions', FieldIndex( 'baselineposition', 1) )&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13px;"&gt;Thanks to Oscar for providing the initial solution.&lt;/SPAN&gt;&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/Straight-Table-Comparison-with-Baseline/m-p/1338475#M833380</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Straight Table - Comparison with Baseline</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-Comparison-with-Baseline/m-p/1338476#M833381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you share some sample data? and an example of the desired outcome?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jun 2017 17:47:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-Comparison-with-Baseline/m-p/1338476#M833381</guid>
      <dc:creator>albertovarela</dc:creator>
      <dc:date>2017-06-08T17:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: Straight Table - Comparison with Baseline</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-Comparison-with-Baseline/m-p/1338477#M833382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It sounds like something that you could accomplish using alternate states.&amp;nbsp; Can you send a screen shot of what you are looking to accomplish?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jun 2017 17:52:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-Comparison-with-Baseline/m-p/1338477#M833382</guid>
      <dc:creator>oscar_ortiz</dc:creator>
      <dc:date>2017-06-08T17:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: Straight Table - Comparison with Baseline</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-Comparison-with-Baseline/m-p/1338478#M833383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please find attached a qvw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jun 2017 20:13:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-Comparison-with-Baseline/m-p/1338478#M833383</guid>
      <dc:creator>albertovarela</dc:creator>
      <dc:date>2017-06-08T20:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: Straight Table - Comparison with Baseline</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-Comparison-with-Baseline/m-p/1338479#M833384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply. However I dont want to calculate the %avg position in the query, as there could be more dimensions in the future. I am trying to see if there is a solution where the tables are not linked and still do what I want to do. Am I being clear?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jun 2017 20:23:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-Comparison-with-Baseline/m-p/1338479#M833384</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-08T20:23:44Z</dc:date>
    </item>
    <item>
      <title>Re: Straight Table - Comparison with Baseline</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-Comparison-with-Baseline/m-p/1338480#M833385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe this is what you are trying to accomplish.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="166260" alt="263406.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/166260_263406.PNG" style="height: 365px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jun 2017 20:57:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-Comparison-with-Baseline/m-p/1338480#M833385</guid>
      <dc:creator>oscar_ortiz</dc:creator>
      <dc:date>2017-06-08T20:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: Straight Table - Comparison with Baseline</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-Comparison-with-Baseline/m-p/1338481#M833386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Oscar...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;YOU ARE THE MAN!!!! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2017 15:04:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-Comparison-with-Baseline/m-p/1338481#M833386</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-09T15:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: Straight Table - Comparison with Baseline</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-Comparison-with-Baseline/m-p/1338482#M833388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oscar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One small issue though. The values dont show up unless I reload the dashboard. Also when I open it in the browser the field is blank.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should I do anything to make it show up all the time?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jun 2017 15:59:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-Comparison-with-Baseline/m-p/1338482#M833388</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-09T15:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: Straight Table - Comparison with Baseline</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-Comparison-with-Baseline/m-p/1338483#M833390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333px;"&gt;Found the solution!!!&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;I dont know why...but the issue seems to be with the FieldIndex function and not the FieldValue function. &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;So this is what I did.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;In my query I sorted the baseline table by baseline position (ascending) and then I changed my calcuation to&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;FieldValue( 'baselineimpressions', Round( Avg( position ) ) )&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;This worked all the time and also showed the values when I accessed it in Access Point through my browser.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;P.S.: I am still curious to find out why the FieldIndex didnt work with a calculation. It worked when I just hardcored an integer like &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;FieldValue( 'baselineimpressions', FieldIndex( 'baselineposition', 1) ) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Thanks to Oscar for providing the initial solution.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jun 2017 17:09:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-Comparison-with-Baseline/m-p/1338483#M833390</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-12T17:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: Straight Table - Comparison with Baseline</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-Table-Comparison-with-Baseline/m-p/1338484#M833391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for not getting back to you sooner, Friday's are travel days and I usually try to stay away from work type issues on the weekends.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the FieldIndex should read the position of the field value by load order.&amp;nbsp; In the example that I provided QlikView read the second table in load order and everything was fine.&amp;nbsp; Based on the expression for rounding the Average position I returned the proper value and everything worked out.&amp;nbsp; You may want to check the results of the calculation to make sure it is returning an integer that will match your baseline position field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From Help:&lt;/P&gt;&lt;P class="syntax"&gt;&lt;A name="kanchor314"&gt;&lt;/A&gt;&lt;A name="FieldIndex"&gt;&lt;/A&gt;&lt;SPAN class="Bold"&gt;&lt;STRONG&gt;FieldIndex&lt;/STRONG&gt;(&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;fieldname , value &lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Returns the position of the field value &lt;SPAN class="Italic"&gt;value&lt;/SPAN&gt; in the field &lt;SPAN class="Italic"&gt;fieldname&lt;/SPAN&gt; (by load order). If &lt;SPAN class="Italic"&gt;value&lt;/SPAN&gt; cannot be found among the field values of the field &lt;SPAN class="Italic"&gt;fieldname&lt;/SPAN&gt;, 0 is returned. &lt;SPAN class="Italic"&gt;Fieldname&lt;/SPAN&gt; must be given as a string value, e.g. the field name must be enclosed by single quotes. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jun 2017 17:54:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-Table-Comparison-with-Baseline/m-p/1338484#M833391</guid>
      <dc:creator>oscar_ortiz</dc:creator>
      <dc:date>2017-06-12T17:54:26Z</dc:date>
    </item>
  </channel>
</rss>

