<?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: Exception aggregation _Count in Calculation view. in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/exception-aggregation-count-in-calculation-view/qaa-p/12593988#M4723133</link>
    <description>&lt;P&gt;Dear Hazra,&lt;/P&gt;&lt;P&gt;Thank you for the detailed steps.&lt;/P&gt;&lt;P&gt;Right now, my Customer is testing the report in Sematics by slice and dicing in the calculation view. And client wants to use one field "NO_OF_POs". If they use Purchase order line number, then it should display 1 for all Line items. And if they remove puchase Line item, then the same field should not sum up all the line items. It should display 1. Just want to know, how to achieve this functionality by using one field ? please suggest. And also, please let me know, where can write SQL in HANA Modeling.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Fri, 17 Jun 2022 04:50:00 GMT</pubDate>
    <dc:creator>former_member184624</dc:creator>
    <dc:date>2022-06-17T04:50:00Z</dc:date>
    <item>
      <title>Exception aggregation _Count in Calculation view.</title>
      <link>https://community.sap.com/t5/technology-q-a/exception-aggregation-count-in-calculation-view/qaq-p/12593986</link>
      <description>&lt;P&gt;Dear HANA Experts,&lt;/P&gt;
  &lt;P&gt;In one of the report, I am displaying the Purchase order number with "&lt;STRONG&gt;Number of Purchase orders&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/attachments/2059453-image.png" /&gt;&lt;/P&gt;
  &lt;P&gt;But if i include PO Line number, below is the output.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2059454-image.png" /&gt;&lt;/P&gt;
  &lt;P&gt;But my client wants to display as below.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2059455-image.png" /&gt;&lt;/P&gt;
  &lt;P&gt;But if i remove PO Line number, the number of POs, should not count. It should be &lt;/P&gt;
  &lt;P&gt;P001 - 1&lt;/P&gt;
  &lt;P&gt;P002 -1&lt;/P&gt;
  &lt;P&gt;How to achieve this in semantics of the calculation view. In Bex report, the system itself is taking care (by exception aggregation -&amp;gt; Count) and it is working fine.&lt;/P&gt;
  &lt;P&gt;Pls suggest, how to achieve this in Sematics of the calculation view, Sematics.&lt;/P&gt;
  &lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 06:23:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/exception-aggregation-count-in-calculation-view/qaq-p/12593986</guid>
      <dc:creator>former_member184624</dc:creator>
      <dc:date>2022-06-16T06:23:57Z</dc:date>
    </item>
    <item>
      <title>Re: Exception aggregation _Count in Calculation view.</title>
      <link>https://community.sap.com/t5/technology-q-a/exception-aggregation-count-in-calculation-view/qaa-p/12593987#M4723132</link>
      <description>&lt;P&gt;Hi  &lt;SPAN class="mention-scrubbed"&gt;jelina.masilamani&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;I think you can achieve the output you need by building a calculation view somewhat like below, I just recreated the sample you have provided.&lt;/P&gt;&lt;P&gt;Table data :&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2061509-table.jpg" /&gt;&lt;/P&gt;&lt;P&gt;Calclation view : Create with default node Projection.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2061515-cv.jpg" /&gt;&lt;/P&gt;&lt;P&gt;Aggregation_1 node selects just the dimensions : PO &amp;amp; PO_ITEM, &amp;amp; Aggregation_2 node selects only PO &amp;amp; aggregated column NO_OF_PO from the same table.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Aggregation_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/attachments/2061518-aggregation-2.jpg" /&gt;&lt;/P&gt;&lt;P&gt;Now simply join between Aggregation_1 &amp;amp; 2 on column PO. Since your default node is projection, it would consider NO_OF_PO as a dimension &amp;amp; you should &lt;STRONG&gt;not&lt;/STRONG&gt; change it to measure if you want the output as you mentioned.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2061519-semantics.jpg" /&gt;&lt;/P&gt;&lt;P&gt;Now, you should be ready with it. Below are 2 sql scripts, one with selecting PO_ITEM &amp;amp; another without selecting PO_ITEM.&lt;/P&gt;&lt;P&gt;SQL1 (with PO_ITEM)&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2061522-sql1.jpg" /&gt;&lt;/P&gt;&lt;P&gt;SQL2 (without PO_ITEM)&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2061523-sql2.jpg" /&gt;&lt;/P&gt;&lt;P&gt;Note : If you are only looking for counter, remember that you can always create a counter based on count distinct exception aggregation&lt;STRONG&gt; if your calculation view's default node is aggregation&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/attachments/2061524-counter.jpg" /&gt;&lt;/P&gt;&lt;P&gt;In that case you need to select PO for the exception aggregation base column.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2061525-po-count.jpg" /&gt;&lt;/P&gt;&lt;P&gt;But this will only return the distinct counts, not total number of POs.&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Abhi&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 18:18:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/exception-aggregation-count-in-calculation-view/qaa-p/12593987#M4723132</guid>
      <dc:creator>Abhishek_Hazra</dc:creator>
      <dc:date>2022-06-16T18:18:23Z</dc:date>
    </item>
    <item>
      <title>Re: Exception aggregation _Count in Calculation view.</title>
      <link>https://community.sap.com/t5/technology-q-a/exception-aggregation-count-in-calculation-view/qaa-p/12593988#M4723133</link>
      <description>&lt;P&gt;Dear Hazra,&lt;/P&gt;&lt;P&gt;Thank you for the detailed steps.&lt;/P&gt;&lt;P&gt;Right now, my Customer is testing the report in Sematics by slice and dicing in the calculation view. And client wants to use one field "NO_OF_POs". If they use Purchase order line number, then it should display 1 for all Line items. And if they remove puchase Line item, then the same field should not sum up all the line items. It should display 1. Just want to know, how to achieve this functionality by using one field ? please suggest. And also, please let me know, where can write SQL in HANA Modeling.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 04:50:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/exception-aggregation-count-in-calculation-view/qaa-p/12593988#M4723133</guid>
      <dc:creator>former_member184624</dc:creator>
      <dc:date>2022-06-17T04:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: Exception aggregation _Count in Calculation view.</title>
      <link>https://community.sap.com/t5/technology-q-a/exception-aggregation-count-in-calculation-view/qaa-p/12593989#M4723134</link>
      <description>&lt;P&gt;Hi  &lt;SPAN class="mention-scrubbed"&gt;jelina.masilamani&lt;/SPAN&gt; ,&lt;BR /&gt;&lt;BR /&gt;That's what I explained in the graphical calculation view in my above comment. Can you try that approach?&lt;/P&gt;&lt;P&gt;And you can write sql in the modeller perspective from SQL console.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2060505-modeller.jpg" /&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;BR /&gt;Abhi&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 09:52:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/exception-aggregation-count-in-calculation-view/qaa-p/12593989#M4723134</guid>
      <dc:creator>Abhishek_Hazra</dc:creator>
      <dc:date>2022-06-17T09:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: Exception aggregation _Count in Calculation view.</title>
      <link>https://community.sap.com/t5/technology-q-a/exception-aggregation-count-in-calculation-view/qaa-p/12593990#M4723135</link>
      <description>&lt;P&gt;Thank you very much.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 13:04:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/exception-aggregation-count-in-calculation-view/qaa-p/12593990#M4723135</guid>
      <dc:creator>former_member184624</dc:creator>
      <dc:date>2022-06-17T13:04:34Z</dc:date>
    </item>
  </channel>
</rss>

