<?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: Need help in writing a complex and tricky logic in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-help-in-writing-a-complex-and-tricky-logic/m-p/1225237#M391208</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Karthick,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A QVW sample would help, but in genral you can do the following:&lt;/P&gt;&lt;P&gt;1. create/load a table with unique months you need to fill the Calc_Direct_Margin value for. Say its name is Target&lt;/P&gt;&lt;P&gt;2. than:&lt;/P&gt;&lt;P&gt;Left Join(Target)&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;DM,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Calc_Direct_Margin&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Resident &amp;lt;Your Table Name&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Where &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;DM like '*-Target'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This would spread target values to all monthes you'll have in the Target table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Maxim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Nov 2016 05:52:54 GMT</pubDate>
    <dc:creator>maksim_senin</dc:creator>
    <dc:date>2016-11-25T05:52:54Z</dc:date>
    <item>
      <title>Need help in writing a complex and tricky logic</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-writing-a-complex-and-tricky-logic/m-p/1225236#M391207</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 a table like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Calc_Direct_Margin&lt;/TD&gt;&lt;TD&gt;DM&lt;/TD&gt;&lt;TD&gt;MonYear&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;-21703.86528&lt;/TD&gt;&lt;TD&gt;Wave3&lt;/TD&gt;&lt;TD&gt;Nov 2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;20422.08753&lt;/TD&gt;&lt;TD&gt;Wave4&lt;/TD&gt;&lt;TD&gt;Nov 2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;103283.0161&lt;/TD&gt;&lt;TD&gt;Wave5&lt;/TD&gt;&lt;TD&gt;Nov 2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;199305.2114&lt;/TD&gt;&lt;TD&gt;Wave3&lt;/TD&gt;&lt;TD&gt;Sep 2016&lt;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&lt;TD&gt;651818.9923&lt;/TD&gt;&lt;TD&gt;Wave4&lt;/TD&gt;&lt;TD&gt;Aug 2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;701478.7511&lt;/TD&gt;&lt;TD&gt;Wave5-Target&lt;/TD&gt;&lt;TD&gt;Jul 2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;737604.8498&lt;/TD&gt;&lt;TD&gt;Wave4&lt;/TD&gt;&lt;TD&gt;Sep 2016&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to create a line chart with MonYear and DM as two dimensions. Then the Sum(Calc_Direct_Margin) as the expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here the trickier part is any DM with the name as "Target" has value for only one MonYear. Example, Wave3-Target, &lt;SPAN style="font-size: 13.3333px;"&gt;Wave4-Target and &lt;SPAN style="font-size: 13.3333px;"&gt;Wave5-Target has value only for MonYear 'Jul 2016' and does not have any value for rest of the MonYear values.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the requirement is for only those Target Waves, i have to accumulate the value for the rest of the MonYear. Example: If Wave3-Target value is 319106.4, then for Aug 2016 it should be &lt;SPAN style="font-size: 13.3333px;"&gt;319106.4+&lt;SPAN style="font-size: 13.3333px;"&gt;319106.4&lt;/SPAN&gt;, for Sep 2016 it should be&lt;SPAN style="font-size: 13.3333px;"&gt;319106.4+&lt;SPAN style="font-size: 13.3333px;"&gt;319106.4+&lt;SPAN style="font-size: 13.3333px;"&gt;319106.4 and so on (Accumulation).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But for the DM without Target on their names, the expression should be a simple sum&lt;SPAN style="font-size: 13.3333px;"&gt;(Calc_Direct_Margin).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone please help me on this logic?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Nov 2016 23:13:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-writing-a-complex-and-tricky-logic/m-p/1225236#M391207</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-24T23:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in writing a complex and tricky logic</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-writing-a-complex-and-tricky-logic/m-p/1225237#M391208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Karthick,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A QVW sample would help, but in genral you can do the following:&lt;/P&gt;&lt;P&gt;1. create/load a table with unique months you need to fill the Calc_Direct_Margin value for. Say its name is Target&lt;/P&gt;&lt;P&gt;2. than:&lt;/P&gt;&lt;P&gt;Left Join(Target)&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;DM,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Calc_Direct_Margin&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Resident &amp;lt;Your Table Name&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Where &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;DM like '*-Target'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This would spread target values to all monthes you'll have in the Target table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Maxim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Nov 2016 05:52:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-writing-a-complex-and-tricky-logic/m-p/1225237#M391208</guid>
      <dc:creator>maksim_senin</dc:creator>
      <dc:date>2016-11-25T05:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in writing a complex and tricky logic</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-writing-a-complex-and-tricky-logic/m-p/1225238#M391209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank You so much Maxim Senin. This is what i exactly looking for. So the concept here is, if there is no matching field between tables then automatically cross join will happen here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Nov 2016 06:55:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-writing-a-complex-and-tricky-logic/m-p/1225238#M391209</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-25T06:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in writing a complex and tricky logic</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-writing-a-complex-and-tricky-logic/m-p/1225239#M391210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The concept here is more about scripting itself - it allows you to prepare your data as you want. Just learn, play and experement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Best regards,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Maxim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Nov 2016 07:12:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-writing-a-complex-and-tricky-logic/m-p/1225239#M391210</guid>
      <dc:creator>maksim_senin</dc:creator>
      <dc:date>2016-11-25T07:12:47Z</dc:date>
    </item>
  </channel>
</rss>

