<?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: Paginated Report not distributing Count values correctly in Report Server</title>
    <link>https://community.fabric.microsoft.com/t5/Report-Server/Paginated-Report-not-distributing-Count-values-correctly/m-p/2891990#M27437</link>
    <description>&lt;P&gt;Hello, when I create the Matrix i receive the following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The expression used for the calculated field 'Metric_01' includes an aggregate, RowNumber, RunningValue, Previous or lookup function. Aggregate, RowNumber, RunningValue, Previous and lookup functions cannot be used in calculated field expressions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Metric_1 =&amp;nbsp;CountDistinct ( IIF&lt;BR /&gt;( Fields!Diff.Value &amp;gt; 0 And Fields!Action_Phase.Value &amp;lt;&amp;gt; "Complete" And Fields!Action_Phase.Value &amp;lt;&amp;gt; "Void",Fields!Number.Value,Nothing),"DataSet1")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help?&lt;/P&gt;</description>
    <pubDate>Tue, 08 Nov 2022 11:11:54 GMT</pubDate>
    <dc:creator>humid</dc:creator>
    <dc:date>2022-11-08T11:11:54Z</dc:date>
    <item>
      <title>Paginated Report not distributing Count values correctly</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Paginated-Report-not-distributing-Count-values-correctly/m-p/2853984#M27124</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've just started to work a bit with Report Builder with our Power BI Report Server and although I've done some progress, I'm right now stuck with a requeriment which is so simple in Power Bi, but seems a bit more complex in a paginated report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First I've created a KPI which is a simple COUNT with some filter expresions:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=CountDistinct ( IIF&lt;BR /&gt;( Fields!Diff.Value &amp;gt; 0 And Fields!Action_Phase.Value &amp;lt;&amp;gt; "Complete" And Fields!Action_Phase.Value &amp;lt;&amp;gt; "Void",Fields!Number.Value,Nothing),"DataSet1")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I put this as an expression in a TextBox, works perfectly and gives me the expected result, say 150&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, now I have to create a table like: City ; Count, but when I create this simple table and set the expresion also in the table, I obtain the following result:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;City&amp;nbsp; &amp;nbsp; &amp;nbsp; Count&lt;/P&gt;&lt;P&gt;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;150&lt;/P&gt;&lt;P&gt;B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;150&lt;/P&gt;&lt;P&gt;C&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;150&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When the expected result would be:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;City&amp;nbsp; &amp;nbsp; &amp;nbsp; Count&lt;/P&gt;&lt;P&gt;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;100&lt;/P&gt;&lt;P&gt;B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;25&lt;/P&gt;&lt;P&gt;C&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;25&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems the count is not being aggregated correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've also tried to create the count as a calculated field in the DataSet, and use this field in the table instead, but is not allowing me as it gives me the following error when I execute the report:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"The expression used for the calculated field 'Count' includes an aggregate, RowNumber, RunningValue, Previous or lookup function. Aggregate, RowNumber, RunningValue, Previous and lookup functions cannot be used in calculated field expressions."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 15:03:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Paginated-Report-not-distributing-Count-values-correctly/m-p/2853984#M27124</guid>
      <dc:creator>humid</dc:creator>
      <dc:date>2022-10-20T15:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: Paginated Report not distributing Count values correctly</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Paginated-Report-not-distributing-Count-values-correctly/m-p/2855421#M27137</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="380647" data-lia-user-login="humid" class="lia-mention lia-mention-user"&gt;humid&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;For create paginated report in report builder, if you create matrix visual, you can set the aggregation type by select during design time.&lt;/P&gt;
&lt;P&gt;For more details, you can read related document:&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/sql/reporting-services/tutorial-creating-a-matrix-report-report-builder?view=sql-server-ver16" target="_blank"&gt;Tutorial: Creating a Matrix Report (Report Builder) - SQL Server Reporting Services (SSRS) | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Community Support Team_ Binbin Yu&lt;BR /&gt;If this post &lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider &lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2022 09:36:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Paginated-Report-not-distributing-Count-values-correctly/m-p/2855421#M27137</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-21T09:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: Paginated Report not distributing Count values correctly</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Paginated-Report-not-distributing-Count-values-correctly/m-p/2855437#M27138</link>
      <description>&lt;P&gt;Hello binbinyu, what is explained in the tutorial is quite basic and simple. In my case, the count measure I want to put in the table, is a measure created with some filter conditions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Power BI Report, when I create the count measure and I put it on a table with other dimensions, it is correctly aggregated. However, I'm not sure how to replicate the same behavior in the Report Builder, as when I try the same, I receive the aggregation error&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2022 09:42:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Paginated-Report-not-distributing-Count-values-correctly/m-p/2855437#M27138</guid>
      <dc:creator>humid</dc:creator>
      <dc:date>2022-10-21T09:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: Paginated Report not distributing Count values correctly</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Paginated-Report-not-distributing-Count-values-correctly/m-p/2891990#M27437</link>
      <description>&lt;P&gt;Hello, when I create the Matrix i receive the following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The expression used for the calculated field 'Metric_01' includes an aggregate, RowNumber, RunningValue, Previous or lookup function. Aggregate, RowNumber, RunningValue, Previous and lookup functions cannot be used in calculated field expressions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Metric_1 =&amp;nbsp;CountDistinct ( IIF&lt;BR /&gt;( Fields!Diff.Value &amp;gt; 0 And Fields!Action_Phase.Value &amp;lt;&amp;gt; "Complete" And Fields!Action_Phase.Value &amp;lt;&amp;gt; "Void",Fields!Number.Value,Nothing),"DataSet1")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 11:11:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Paginated-Report-not-distributing-Count-values-correctly/m-p/2891990#M27437</guid>
      <dc:creator>humid</dc:creator>
      <dc:date>2022-11-08T11:11:54Z</dc:date>
    </item>
    <item>
      <title>Re: Paginated Report not distributing Count values correctly</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Paginated-Report-not-distributing-Count-values-correctly/m-p/2892017#M27456</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;I've just started to work a bit with Report Builder with our Power BI Report Server and although I've done some progress, I'm right now stuck with a requeriment which is so simple in Power Bi, but seems a bit more complex in a paginated report.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;First I've created a KPI which is a simple COUNT with some filter expresions:&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;=CountDistinct ( IIF&lt;BR /&gt;( Fields! Diff.Value &amp;gt; 0 And Fields! Action_Phase.Value &amp;lt;&amp;gt; "Complete" And Fields! Action_Phase.Value &amp;lt;&amp;gt; "Void",Fields! Number.Value,Nothing),"DataSet1")&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;If I put this as an expression in a TextBox, works perfectly and gives me the expected result, say 150&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;However, now I have to create a Matrix like: City ; Count, but when I create this simple table and set the expresion also in the table, I obtain the following result:&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;City      Count&lt;/P&gt;&lt;P&gt;A           150&lt;/P&gt;&lt;P&gt;B           150&lt;/P&gt;&lt;P&gt;C           150&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;When the expected result would be:&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;City      Count&lt;/P&gt;&lt;P&gt;A           100&lt;/P&gt;&lt;P&gt;B           25&lt;/P&gt;&lt;P&gt;C           25&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;It seems the count is not being aggregated correctly.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;I've also tried to create the count as a calculated field in the DataSet, and use this field in the table instead, but is not allowing me as it gives me the following error when I execute the report:&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;"The expression used for the calculated field 'Count' includes an aggregate, RowNumber, RunningValue, Previous or lookup function. Aggregate, RowNumber, RunningValue, Previous and lookup functions cannot be used in calculated field expressions."&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 11:24:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Paginated-Report-not-distributing-Count-values-correctly/m-p/2892017#M27456</guid>
      <dc:creator>Syndicate_Admin</dc:creator>
      <dc:date>2022-11-08T11:24:13Z</dc:date>
    </item>
  </channel>
</rss>

