<?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: FILTER() in CALCULATE () with VALUES() breaks aggreagtion &amp;quot;scope&amp;quot; in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-in-CALCULATE-with-VALUES-breaks-aggreagtion-quot-scope/m-p/3412283#M129006</link>
    <description>&lt;P&gt;What's the point of using VALUES in the CALCULATE?&amp;nbsp; Should not make any difference?&lt;/P&gt;</description>
    <pubDate>Sat, 02 Sep 2023 22:32:08 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2023-09-02T22:32:08Z</dc:date>
    <item>
      <title>FILTER() in CALCULATE () with VALUES() breaks aggreagtion "scope"</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-in-CALCULATE-with-VALUES-breaks-aggreagtion-quot-scope/m-p/3408289#M128798</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following Measure:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    SUMX (
        'DC Volume',
        DIVIDE (
            CALCULATE ([Delivery Line Count OSR], VALUES ('DC Volume'[FCRateKey])),
            CALCULATE (
                SUM ( Forecast_ProductivityRate[Productivity Rate] ),
                VALUES ( Forecast_ProductivityRate[FCRateKey] )
            )
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This produces the output of 1646.829 (which is correct) when put in a card visual. To visualize the result:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;If I add a FILTER() expression like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;OSR_FC_Rate_Worked_Hours = 

    SUMX (
        'DC Volume',
        DIVIDE (
            CALCULATE ([Delivery Line Count OSR], VALUES ('DC Volume'[FCRateKey])),
            CALCULATE (
                SUM ( Forecast_ProductivityRate[Productivity Rate] ),
                VALUES ( Forecast_ProductivityRate[FCRateKey] ),
                FILTER (
                    Forecast_ProductivityRate,
                    Forecast_ProductivityRate[From Date] &amp;gt;= [Selected Date SOMONTH]
                        &amp;amp;&amp;amp; Forecast_ProductivityRate[To Date] &amp;lt;= [Selected Date EOMONTH]
                        &amp;amp;&amp;amp; Forecast_ProductivityRate[ActivityNM / LABROLEV4ID] = "802-91"
                )
            )
        )
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then the aggregation specififed with VALUES() breaks. Instead of summing up all the results of each division, it uses the total:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I avoid this behaviour?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The two tables&amp;nbsp;&lt;SPAN&gt;DC Volume and&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Forecast_ProductivityRate have a many to one relationship (multiple lines in DC Volume relate to one in Forecast) based on FCRateKey (this is also a unique key in&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Forecast_ProductivityRate).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; br&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 08:32:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-in-CALCULATE-with-VALUES-breaks-aggreagtion-quot-scope/m-p/3408289#M128798</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-31T08:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: FILTER() in CALCULATE () with VALUES() breaks aggreagtion "scope"</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-in-CALCULATE-with-VALUES-breaks-aggreagtion-quot-scope/m-p/3412283#M129006</link>
      <description>&lt;P&gt;What's the point of using VALUES in the CALCULATE?&amp;nbsp; Should not make any difference?&lt;/P&gt;</description>
      <pubDate>Sat, 02 Sep 2023 22:32:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-in-CALCULATE-with-VALUES-breaks-aggreagtion-quot-scope/m-p/3412283#M129006</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2023-09-02T22:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: FILTER() in CALCULATE () with VALUES() breaks aggreagtion "scope"</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-in-CALCULATE-with-VALUES-breaks-aggreagtion-quot-scope/m-p/3444560#M130948</link>
      <description>&lt;P&gt;I hope this message finds you well. I've noticed that this solution remain unresolved. If any of you have managed to find a resolution to the issue, I kindly request that you share your solution for the benefit of the entire community. Alternatively, if you're still facing challenges, please do let us know as well.&lt;/P&gt;
&lt;P&gt;Your insights and updates will greatly assist others who might be encountering the same challenge.&lt;/P&gt;</description>
      <pubDate>Sun, 24 Sep 2023 07:57:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-in-CALCULATE-with-VALUES-breaks-aggreagtion-quot-scope/m-p/3444560#M130948</guid>
      <dc:creator>technolog</dc:creator>
      <dc:date>2023-09-24T07:57:53Z</dc:date>
    </item>
  </channel>
</rss>

