<?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: How to calculate a sum with part of page filters + 1 formula filter in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-a-sum-with-part-of-page-filters-1-formula/m-p/3387618#M127669</link>
    <description>&lt;P&gt;Hello Sahir,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In fact there is a problem.&lt;/P&gt;&lt;P&gt;The result is empty. I have the impression that it does not accept to have several machines selected&lt;/P&gt;&lt;P&gt;VtSortiesV2'[Machine] = SELECTEDVALUE('VtSortiesV2'[Machine])&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 18 Aug 2023 14:49:59 GMT</pubDate>
    <dc:creator>Dje33</dc:creator>
    <dc:date>2023-08-18T14:49:59Z</dc:date>
    <item>
      <title>How to calculate a sum with part of page filters + 1 formula filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-a-sum-with-part-of-page-filters-1-formula/m-p/3376646#M127157</link>
      <description>&lt;P&gt;Good morning,&lt;/P&gt;&lt;P&gt;I need a little help.&lt;/P&gt;&lt;P&gt;I created a report with 3 filters (date / workshop / machine). file attached&lt;BR /&gt;My table contains quantities of parts produced by machine and date&amp;nbsp; (each machine is in a workshop, there are several workshops)&lt;/P&gt;&lt;P&gt;I want to calculate a sum of production quantity and display it in the report with the following filters&lt;BR /&gt;- remove the date filter (report page filter)&lt;BR /&gt;- keep the workshop report filter&amp;nbsp;(report page filter)&lt;BR /&gt;- keep the machine report filter&amp;nbsp;(report page filter)&lt;BR /&gt;- add a week filter (formula filter) ("week" data present in the table)&lt;/P&gt;&lt;P&gt;I tried several things without success. I always have either all the filters of the active report or none...&lt;/P&gt;&lt;P&gt;as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the result obtained shows that either&amp;nbsp;&lt;/P&gt;&lt;P&gt;z_QteProdSem =&lt;BR /&gt;VAR ActualWeek = MAXX(all(VtSortiesV2),VtSortiesV2[y_AnSem])&lt;BR /&gt;VAR ActualWeekPeriode = FILTER(ALLEXCEPT(VtSortiesV2,VtSortiesV2[y_atelier'],VtSortiesV2[Machine]),VtSortiesV2[y_AnSem]=ActualWeek)&lt;BR /&gt;RETURN&lt;BR /&gt;SUMX(ActualWeekPeriode, VtSortiesV2[QuantiteTotale])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;z_QtéSem2 = sumx(FILTER(ALLEXCEPT(Feuil1,Feuil1[Atelier'],Feuil1[Machine]),Feuil1[semaine]=24),Feuil1[QuantiteTotale])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the result obtained shows that either all the filters of the active report or none filter...&lt;/P&gt;&lt;P&gt;Can you help me?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 15:57:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-a-sum-with-part-of-page-filters-1-formula/m-p/3376646#M127157</guid>
      <dc:creator>Dje33</dc:creator>
      <dc:date>2023-08-11T15:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate a sum with part of page filters + 1 formula filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-a-sum-with-part-of-page-filters-1-formula/m-p/3377916#M127219</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="601991" data-lia-user-login="Dje33" class="lia-mention lia-mention-user"&gt;Dje33&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;To achieve this, you can use a combination of measures and the &lt;/SPAN&gt;ALL&lt;SPAN&gt; function to control the context of the calculation:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1.&amp;nbsp;Create a Measure for Week Filter&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SelectedWeek = MAX('VtSortiesV2'[y_AnSem])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2.&amp;nbsp;Create a Measure for Calculating Sum&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;z_QteProdSem = 
VAR SelectedWeek = [SelectedWeek]  -- Use the measure you created in step 1
RETURN
SUMX(
    FILTER(
        ALL('VtSortiesV2'),
        'VtSortiesV2'[y_AnSem] = SelectedWeek &amp;amp;&amp;amp;
        'VtSortiesV2'[y_atelier'] = SELECTEDVALUE('VtSortiesV2'[y_atelier']) &amp;amp;&amp;amp;
        'VtSortiesV2'[Machine] = SELECTEDVALUE('VtSortiesV2'[Machine])
    ),
    'VtSortiesV2'[QuantiteTotale]
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Should you require further assistance, please do not hesitate to reach out to me.&lt;/P&gt;</description>
      <pubDate>Sun, 13 Aug 2023 17:48:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-a-sum-with-part-of-page-filters-1-formula/m-p/3377916#M127219</guid>
      <dc:creator>Sahir_Maharaj</dc:creator>
      <dc:date>2023-08-13T17:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate a sum with part of page filters + 1 formula filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-a-sum-with-part-of-page-filters-1-formula/m-p/3385573#M127573</link>
      <description>&lt;P&gt;Many thanks Sahir,&lt;/P&gt;&lt;P&gt;Your answer is so simple!&lt;/P&gt;&lt;P&gt;I thought too complicated, I also think I succeeded with variables and CALCULATE&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2023 14:44:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-a-sum-with-part-of-page-filters-1-formula/m-p/3385573#M127573</guid>
      <dc:creator>Dje33</dc:creator>
      <dc:date>2023-08-17T14:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate a sum with part of page filters + 1 formula filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-a-sum-with-part-of-page-filters-1-formula/m-p/3387618#M127669</link>
      <description>&lt;P&gt;Hello Sahir,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In fact there is a problem.&lt;/P&gt;&lt;P&gt;The result is empty. I have the impression that it does not accept to have several machines selected&lt;/P&gt;&lt;P&gt;VtSortiesV2'[Machine] = SELECTEDVALUE('VtSortiesV2'[Machine])&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2023 14:49:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-a-sum-with-part-of-page-filters-1-formula/m-p/3387618#M127669</guid>
      <dc:creator>Dje33</dc:creator>
      <dc:date>2023-08-18T14:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate a sum with part of page filters + 1 formula filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-a-sum-with-part-of-page-filters-1-formula/m-p/3388746#M127731</link>
      <description>&lt;P&gt;Hello Sahir,&lt;/P&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;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;REMOVEFILTERS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;calendrier&lt;/SPAN&gt;&lt;SPAN&gt;[FYannée]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;codesEvt&lt;/SPAN&gt;&lt;SPAN&gt;[TRS]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"oui"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;vevenements&lt;/SPAN&gt;&lt;SPAN&gt;[y_FY]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;FYN1Select&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Aug 2023 12:29:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-a-sum-with-part-of-page-filters-1-formula/m-p/3388746#M127731</guid>
      <dc:creator>Dje33</dc:creator>
      <dc:date>2023-08-20T12:29:18Z</dc:date>
    </item>
  </channel>
</rss>

