<?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 Use different column for some period. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Use-different-column-for-some-period/m-p/1550350#M440216</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have a business rule to use different data for year 2018, since there are no data for 2018 on primary source.&lt;/P&gt;&lt;P&gt;I prepared some use case QVW.&lt;/P&gt;&lt;P&gt;My Data:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;BR /&gt;ID, Year, Amount1, Amount2&lt;BR /&gt;1, 2018, 100&lt;BR /&gt;2, 2018, 200&lt;BR /&gt;3, 2018, 300&lt;BR /&gt;4, 2018, 400&lt;BR /&gt;5, 2018, 500&lt;BR /&gt;6, 2018, 600&lt;BR /&gt;7, 2018, 700&lt;BR /&gt;8, 2019, 5000, 800&lt;BR /&gt;9, 2019, 6000, 900&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Primary source is Amount2, but for 2018 I want to use Amount1.&lt;/P&gt;&lt;P&gt;I dont want to do big changes in my expression. So the question is, ho to do it best? Probably with set analysis. (better without IFs).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I want in straight table, is this:&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;year&lt;/TD&gt;&lt;TD&gt;Amount&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2018&lt;/TD&gt;&lt;TD&gt;2800&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2019&lt;/TD&gt;&lt;TD&gt;1700&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for help.&lt;/P&gt;</description>
    <pubDate>Thu, 28 Feb 2019 09:48:16 GMT</pubDate>
    <dc:creator>retko1985</dc:creator>
    <dc:date>2019-02-28T09:48:16Z</dc:date>
    <item>
      <title>Use different column for some period.</title>
      <link>https://community.qlik.com/t5/QlikView/Use-different-column-for-some-period/m-p/1550350#M440216</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have a business rule to use different data for year 2018, since there are no data for 2018 on primary source.&lt;/P&gt;&lt;P&gt;I prepared some use case QVW.&lt;/P&gt;&lt;P&gt;My Data:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;BR /&gt;ID, Year, Amount1, Amount2&lt;BR /&gt;1, 2018, 100&lt;BR /&gt;2, 2018, 200&lt;BR /&gt;3, 2018, 300&lt;BR /&gt;4, 2018, 400&lt;BR /&gt;5, 2018, 500&lt;BR /&gt;6, 2018, 600&lt;BR /&gt;7, 2018, 700&lt;BR /&gt;8, 2019, 5000, 800&lt;BR /&gt;9, 2019, 6000, 900&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Primary source is Amount2, but for 2018 I want to use Amount1.&lt;/P&gt;&lt;P&gt;I dont want to do big changes in my expression. So the question is, ho to do it best? Probably with set analysis. (better without IFs).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I want in straight table, is this:&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;year&lt;/TD&gt;&lt;TD&gt;Amount&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2018&lt;/TD&gt;&lt;TD&gt;2800&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2019&lt;/TD&gt;&lt;TD&gt;1700&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for help.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2019 09:48:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-different-column-for-some-period/m-p/1550350#M440216</guid>
      <dc:creator>retko1985</dc:creator>
      <dc:date>2019-02-28T09:48:16Z</dc:date>
    </item>
    <item>
      <title>Re: Use different column for some period.</title>
      <link>https://community.qlik.com/t5/QlikView/Use-different-column-for-some-period/m-p/1550406#M440224</link>
      <description>You can do changes in script so that you don't required changes in front end&lt;BR /&gt;try below&lt;BR /&gt;&lt;BR /&gt;1st apporach&lt;BR /&gt;LOAD ID,if(Year='2018',Amount1,Amount2) as Amount INLINE [&lt;BR /&gt;ID, Year, Amount1, Amount2&lt;BR /&gt;1, 2018, 100&lt;BR /&gt;2, 2018, 200&lt;BR /&gt;3, 2018, 300&lt;BR /&gt;4, 2018, 400&lt;BR /&gt;5, 2018, 500&lt;BR /&gt;6, 2018, 600&lt;BR /&gt;7, 2018, 700&lt;BR /&gt;8, 2019, 5000, 800&lt;BR /&gt;9, 2019, 6000, 900&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;2nd Approach&lt;BR /&gt;In front end use Alt()&lt;BR /&gt;Alt(Amount2,Amount1)&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Prashant</description>
      <pubDate>Thu, 28 Feb 2019 10:45:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-different-column-for-some-period/m-p/1550406#M440224</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2019-02-28T10:45:22Z</dc:date>
    </item>
  </channel>
</rss>

