<?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 Recalculate column values based on column name in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Recalculate-column-values-based-on-column-name/m-p/316863#M116905</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michael, thanks.&lt;/P&gt;&lt;P&gt;Your answer works as you designed it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I only get data when the field is TempF. Not when the field is TempC &lt;EM&gt;(this happens when I use *.qvd in the load statement.).&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I suspect I could solve this with a for each next statement, but then I have to name all QVD in the comma separated list .......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The next step is to find out how I can load all QVD's, containing 12 columns of data, in 1 statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Nov 2011 08:30:57 GMT</pubDate>
    <dc:creator>Michiel_QV_Fan</dc:creator>
    <dc:date>2011-11-15T08:30:57Z</dc:date>
    <item>
      <title>Recalculate column values based on column name</title>
      <link>https://community.qlik.com/t5/QlikView/Recalculate-column-values-based-on-column-name/m-p/316857#M116899</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 have multiple QVD's. These QVD's have the sames structure but different column names:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TempC and TempF (Temperature Celsius and Temperature Fahrenheit)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to harmonize these columns to be loaded in my application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I recalculate the TempF column to celsius when the column is named TempF (obviously a TempC doens't need to be recalculated &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/laugh.png" /&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried this&lt;SPAN style="color: #0000ff;"&gt; if(TempF= TempF, ((tempF-32) * (5/9)), TempC) as TempC&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but that gives an error because TempC cannot be found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2011 10:45:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Recalculate-column-values-based-on-column-name/m-p/316857#M116899</guid>
      <dc:creator>Michiel_QV_Fan</dc:creator>
      <dc:date>2011-11-14T10:45:23Z</dc:date>
    </item>
    <item>
      <title>Recalculate column values based on column name</title>
      <link>https://community.qlik.com/t5/QlikView/Recalculate-column-values-based-on-column-name/m-p/316858#M116900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I don't see need for "IF" - just use expression based on TempF and call it TempC.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2011 11:34:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Recalculate-column-values-based-on-column-name/m-p/316858#M116900</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-11-14T11:34:54Z</dc:date>
    </item>
    <item>
      <title>Recalculate column values based on column name</title>
      <link>https://community.qlik.com/t5/QlikView/Recalculate-column-values-based-on-column-name/m-p/316859#M116901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michael, thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to load all the different QVD's in one app. If the load encounters a TempF is should be recalcuated, if this column is TempC it should use it without calculation. Therefore 1 table is created with all data in celsius.&lt;/P&gt;&lt;P&gt;Therefor the If statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2011 11:38:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Recalculate-column-values-based-on-column-name/m-p/316859#M116901</guid>
      <dc:creator>Michiel_QV_Fan</dc:creator>
      <dc:date>2011-11-14T11:38:12Z</dc:date>
    </item>
    <item>
      <title>Recalculate column values based on column name</title>
      <link>https://community.qlik.com/t5/QlikView/Recalculate-column-values-based-on-column-name/m-p/316860#M116902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's what I thoght.&amp;nbsp; This is my understanding.&lt;/P&gt;&lt;P&gt;QVD 1 has TempC, and QVD2 has TempF.&amp;nbsp; You load all this in one logical table:&lt;/P&gt;&lt;P&gt;Table:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;TempC,&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;FROM QVD1...;&lt;/P&gt;&lt;P&gt;CONCATENATE (Table) LOAD&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;(TempF-32)*5/9 as TempC,&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;FROM QVD2...;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2011 13:19:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Recalculate-column-values-based-on-column-name/m-p/316860#M116902</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-11-14T13:19:24Z</dc:date>
    </item>
    <item>
      <title>Recalculate column values based on column name</title>
      <link>https://community.qlik.com/t5/QlikView/Recalculate-column-values-based-on-column-name/m-p/316861#M116903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;Yes that's true.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However. I have more than 2 QVD's and I cannot determine which one has the C or F.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And, I cannot do this manually for all QVD's.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2011 13:27:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Recalculate-column-values-based-on-column-name/m-p/316861#M116903</guid>
      <dc:creator>Michiel_QV_Fan</dc:creator>
      <dc:date>2011-11-14T13:27:10Z</dc:date>
    </item>
    <item>
      <title>Recalculate column values based on column name</title>
      <link>https://community.qlik.com/t5/QlikView/Recalculate-column-values-based-on-column-name/m-p/316862#M116904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, in this case it is still possible to do something.&amp;nbsp; Take a look at the error variables.&amp;nbsp; You can set ErrorMode=0, so the script continues to run in case of error.&amp;nbsp; Also, check variable ScripError in the script - if Script Error=11, that means that field not found.&amp;nbsp; So, it may look somewhat like this:&lt;BR /&gt;...&lt;BR /&gt;SET ErrorMode=0;&lt;BR /&gt;FieldCheck:&lt;/P&gt;&lt;P&gt;First 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // no need to load more than one - just to see if th field exists&lt;BR /&gt;LOAD TempF FROM QVD1.qvd (qvd);&lt;/P&gt;&lt;P&gt;IF ScriptError=11 THEN&lt;/P&gt;&lt;P&gt;// it was error, use TempC&lt;BR /&gt;Table:&lt;BR /&gt;LOAD&lt;BR /&gt;...&lt;BR /&gt;TempC,&lt;BR /&gt;...&lt;BR /&gt;FROM QVD1.qvd (qvd);&lt;BR /&gt;ELSE&lt;/P&gt;&lt;P&gt;// TempF exists&lt;BR /&gt;Table:&lt;BR /&gt;LOAD&lt;BR /&gt;...&lt;BR /&gt;(TempF-32)*5/9 as TempC,&lt;BR /&gt;...&lt;BR /&gt;FROM QVD1.qvd (qvd);&lt;BR /&gt;ENDIF&lt;/P&gt;&lt;P&gt;DROP TABLE FieldCheck;&lt;/P&gt;&lt;P&gt;SET ScriptError=0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // not sure it works, maybe it should be done differently&lt;BR /&gt;...&lt;BR /&gt;And the same for each QVD...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2011 15:29:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Recalculate-column-values-based-on-column-name/m-p/316862#M116904</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-11-14T15:29:11Z</dc:date>
    </item>
    <item>
      <title>Recalculate column values based on column name</title>
      <link>https://community.qlik.com/t5/QlikView/Recalculate-column-values-based-on-column-name/m-p/316863#M116905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michael, thanks.&lt;/P&gt;&lt;P&gt;Your answer works as you designed it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I only get data when the field is TempF. Not when the field is TempC &lt;EM&gt;(this happens when I use *.qvd in the load statement.).&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I suspect I could solve this with a for each next statement, but then I have to name all QVD in the comma separated list .......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The next step is to find out how I can load all QVD's, containing 12 columns of data, in 1 statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2011 08:30:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Recalculate-column-values-based-on-column-name/m-p/316863#M116905</guid>
      <dc:creator>Michiel_QV_Fan</dc:creator>
      <dc:date>2011-11-15T08:30:57Z</dc:date>
    </item>
  </channel>
</rss>

