<?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 calculate the SUM of a mesure in Directquery mode in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-the-SUM-of-a-mesure-in-Directquery-mode/m-p/3058051#M105566</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have a table named "V_QTSDAMA"&amp;nbsp;and I have a column named "ItemName"&amp;nbsp; with a&amp;nbsp;&lt;SPAN&gt;repeating&amp;nbsp;&lt;/SPAN&gt;products&amp;nbsp;with its own stock.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to calculate the sum of " BESOIN PF " for each product. ( to not to have the products repeating themselves)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS :&amp;nbsp;note that the column "BESOIN PF" it's calculated as a Mesure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- i work on a directquery Mode.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For exemple this is result that I want&amp;nbsp; , i made it on excel :&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ACHRAF KASMI&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 02 Feb 2023 14:12:47 GMT</pubDate>
    <dc:creator>achrafkasmi</dc:creator>
    <dc:date>2023-02-02T14:12:47Z</dc:date>
    <item>
      <title>calculate the SUM of a mesure in Directquery mode</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-the-SUM-of-a-mesure-in-Directquery-mode/m-p/3058051#M105566</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have a table named "V_QTSDAMA"&amp;nbsp;and I have a column named "ItemName"&amp;nbsp; with a&amp;nbsp;&lt;SPAN&gt;repeating&amp;nbsp;&lt;/SPAN&gt;products&amp;nbsp;with its own stock.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to calculate the sum of " BESOIN PF " for each product. ( to not to have the products repeating themselves)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS :&amp;nbsp;note that the column "BESOIN PF" it's calculated as a Mesure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- i work on a directquery Mode.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For exemple this is result that I want&amp;nbsp; , i made it on excel :&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ACHRAF KASMI&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2023 14:12:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-the-SUM-of-a-mesure-in-Directquery-mode/m-p/3058051#M105566</guid>
      <dc:creator>achrafkasmi</dc:creator>
      <dc:date>2023-02-02T14:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: calculate the SUM of a mesure in Directquery mode</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-the-SUM-of-a-mesure-in-Directquery-mode/m-p/3058102#M105571</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="446477" data-lia-user-login="achrafkasmi" class="lia-mention lia-mention-user"&gt;achrafkasmi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how is&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;[BESOIN PF] defined?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2023 14:30:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-the-SUM-of-a-mesure-in-Directquery-mode/m-p/3058102#M105571</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-02-02T14:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: calculate the SUM of a mesure in Directquery mode</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-the-SUM-of-a-mesure-in-Directquery-mode/m-p/3058132#M105574</link>
      <description>&lt;P&gt;I’ll explain, the &lt;SPAN&gt;[BESOIN PF] is&lt;/SPAN&gt; need is the current stock less the need for current orders and this is the formula :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;BESOIN PF = 
MIN('V_QTSDAMA'[OnHand])-min('V_QTSDAMA'[qtsdemandé])&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ACHRAF KASMI&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2023 14:44:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-the-SUM-of-a-mesure-in-Directquery-mode/m-p/3058132#M105574</guid>
      <dc:creator>achrafkasmi</dc:creator>
      <dc:date>2023-02-02T14:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: calculate the SUM of a mesure in Directquery mode</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-the-SUM-of-a-mesure-in-Directquery-mode/m-p/3060169#M105694</link>
      <description>&lt;P&gt;any help please ?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 11:03:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-the-SUM-of-a-mesure-in-Directquery-mode/m-p/3060169#M105694</guid>
      <dc:creator>achrafkasmi</dc:creator>
      <dc:date>2023-02-03T11:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: calculate the SUM of a mesure in Directquery mode</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-the-SUM-of-a-mesure-in-Directquery-mode/m-p/3084499#M107698</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="446477" data-lia-user-login="achrafkasmi" class="lia-mention lia-mention-user"&gt;achrafkasmi&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your description, here are my steps you can follow as a solution.&lt;/P&gt;
&lt;P&gt;(1) This is my test data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;(2) We can create two measures.&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;BESOIN PF = MIN('Table (2)'[OnHand])-MIN('Table (2)'[qtsdemandé])&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Measure 2 = SUMX('Table (2)','Table (2)'[BESOIN PF])&lt;/LI-CODE&gt;
&lt;P&gt;(3) Then the result is as follows.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;If the above one can't help you get the desired result, please provide some&amp;nbsp;&lt;STRONG&gt;sample data&lt;/STRONG&gt;&amp;nbsp;in your tables (&lt;STRONG&gt;exclude&amp;nbsp;sensitive&amp;nbsp;data&lt;/STRONG&gt;) with&amp;nbsp;&lt;STRONG&gt;Text&lt;/STRONG&gt;&amp;nbsp;format and your&amp;nbsp;&lt;STRONG&gt;expected result&lt;/STRONG&gt;&amp;nbsp;with backend logic and special examples.&amp;nbsp;&lt;STRONG&gt;It is better&lt;/STRONG&gt;&amp;nbsp;if you can share a&amp;nbsp;&lt;STRONG&gt;simplified&lt;/STRONG&gt;&amp;nbsp;pbix file.&amp;nbsp;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Neeko Tang&lt;/P&gt;
&lt;P&gt;If this post  &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution &lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2023 06:55:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-the-SUM-of-a-mesure-in-Directquery-mode/m-p/3084499#M107698</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-02-17T06:55:12Z</dc:date>
    </item>
  </channel>
</rss>

