<?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>Question Re: Simple Join Issue in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/simple-join-issue/qaa-p/11373461#M4220701</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ben,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you have mentioned that the right outer join was done on salesman code and date, that could be the issue. Try taking out salesman code from the join or if you can give us more input it would be helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Nov 2015 04:06:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2015-11-18T04:06:25Z</dc:date>
    <item>
      <title>Simple Join Issue</title>
      <link>https://community.sap.com/t5/technology-q-a/simple-join-issue/qaq-p/11373457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/830638" /&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are in HANA SP9&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to have a actuals vs target for salesman as follows&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/830634" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actuals is already available in a calculation view. Target is arriving as flatfile. Hence created analytical view for same&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Projection 1 -&amp;gt; target&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/830636" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Projection 2 - &amp;gt; actuals&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/830637" /&gt;&lt;/P&gt;&lt;P&gt;I joined this 2 projection by salesman code and date and used right outer join ( right -&amp;gt;target, left -&amp;gt; actuals)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and cardinality 1:1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ideally it should work, but What I am getting is strange output&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/830640" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I played around with cardinality and changes join type to inner/left but nothing giving me correct output&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any inputs much appreciated&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Nov 2015 10:28:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/simple-join-issue/qaq-p/11373457</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-11-14T10:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Join Issue</title>
      <link>https://community.sap.com/t5/technology-q-a/simple-join-issue/qaa-p/11373458#M4220698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ben,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below are the things I did to achieve the output you were expecting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Created some sample tables and loaded the data you mentioned to get the required output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create column table target(date_col date, value int);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;insert into target values(to_date('01/01/2015','DD/MM/YYYY'), 100);&lt;/P&gt;&lt;P&gt;insert into target values(to_date('01/02/2015','DD/MM/YYYY'), 100);&lt;/P&gt;&lt;P&gt;insert into target values(to_date('01/03/2015','DD/MM/YYYY'), 100);&lt;/P&gt;&lt;P&gt;insert into target values(to_date('01/04/2015','DD/MM/YYYY'), 100);&lt;/P&gt;&lt;P&gt;insert into target values(to_date('01/05/2015','DD/MM/YYYY'), 100);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create column table actuals(date_col date, value int);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;insert into actuals values(to_date('01/01/2015','DD/MM/YYYY'), 200);&lt;/P&gt;&lt;P&gt;insert into actuals values(to_date('01/03/2015','DD/MM/YYYY'), 60);&lt;/P&gt;&lt;P&gt;insert into actuals values(to_date('01/04/2015','DD/MM/YYYY'), 150);&lt;/P&gt;&lt;P&gt;insert into actuals values(to_date('01/05/2015','DD/MM/YYYY'), 100);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The below SQL query gives the exact output you are expecting :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select t.date_col, t.value as target, coalesce(a.value,0) as actual from&lt;/P&gt;&lt;P&gt;target t left outer join actuals a&lt;/P&gt;&lt;P&gt;on t.date_col = a.date_col;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now achieving the same thing using graphical calculation view :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Created a graphical calculation view of Dimension type which looks like below :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/831066" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Two projections which will reflect the table data and one join node which does the left outer join of target table with actuals table to get the required output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/831070" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Nov 2015 06:24:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/simple-join-issue/qaa-p/11373458#M4220698</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-11-16T06:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Join Issue</title>
      <link>https://community.sap.com/t5/technology-q-a/simple-join-issue/qaa-p/11373459#M4220699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anil, Thanks This is exactly what was done , but the result was coming incorrect Any option to debug it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Nov 2015 12:13:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/simple-join-issue/qaa-p/11373459#M4220699</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-11-17T12:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Join Issue</title>
      <link>https://community.sap.com/t5/technology-q-a/simple-join-issue/qaa-p/11373460#M4220700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ben,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please do following steps to get desired result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create calculation view as per the below image&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Image 1 :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/832461" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Join on proper columns. I have used only date columns. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Image 2:&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/832462" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please create link between join and top aggregation node. As per shown in image 1.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On top level, I have used aggregation node. Please right click on "values" column and select " add to output" for both columns. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Image3:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/832463" /&gt;&lt;/P&gt;&lt;P&gt;Now, below image is for your ref.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Image 4 :&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/832465" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, activate your model and you will get your desired results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Image 5:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/832466" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you still facing problem or not getting proper result then please coordinate with you HANA admin guy. There could be problem in SAP HANA modeler.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope, It will solve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Vikram Divekar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Nov 2015 18:52:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/simple-join-issue/qaa-p/11373460#M4220700</guid>
      <dc:creator>former_member200930</dc:creator>
      <dc:date>2015-11-17T18:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Join Issue</title>
      <link>https://community.sap.com/t5/technology-q-a/simple-join-issue/qaa-p/11373461#M4220701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ben,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you have mentioned that the right outer join was done on salesman code and date, that could be the issue. Try taking out salesman code from the join or if you can give us more input it would be helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Nov 2015 04:06:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/simple-join-issue/qaa-p/11373461#M4220701</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-11-18T04:06:25Z</dc:date>
    </item>
  </channel>
</rss>

