<?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: summing qty using two different columns in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/summing-qty-using-two-different-columns/m-p/2058409#M46417</link>
    <description>&lt;P&gt;&lt;SPAN&gt;SUMX(VALUES(Planilha1[QuotationID]),VAR _c=Planilha1[QuotationID] RETURN MAXX(TOPN(1,FILTER(Planilha1,Planilha1[QuotationID]=_c),Planilha1[Revision],ASC),Planilha1[Vehicle QTY]))&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 06 Sep 2021 02:47:22 GMT</pubDate>
    <dc:creator>wdx223_Daniel</dc:creator>
    <dc:date>2021-09-06T02:47:22Z</dc:date>
    <item>
      <title>summing qty using two different columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/summing-qty-using-two-different-columns/m-p/2058160#M46412</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi everyone . i need help . I need to sum the qty of vehicles of each quotation, but only for the first revision .&amp;nbsp;&lt;BR /&gt;i marked in blue those ones that need to sum, the earliest revision of each quotation.&amp;nbsp; then to group by month&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;there are quotations (7052, revision 0) that started in august, so the revision of september (7052-1) must be ignored for example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i tried this dax command,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;_SomaMaxRevisao = SUMX(VALUES(Planilha1[QuotationID]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE(SUM(Planilha1[Vehicle QTY]), &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ALLEXCEPT('Planilha1', Planilha1[QuotationID]), &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FILTER(ALL&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;(Planilha1[Revision]), Planilha1[Revision] = CALCULATE(MIN(Planilha1[Revision]),ALLEXCEPT('Planilha1',Planilha1[QuotationID])))))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;however, when i group by month, it considers the earliest revision of the month. It Counts 7052-0 as the earliest of august and 7052-1 as the earliest of september. this is not appropriated . I need to only count of august s the previous month&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;how can i solve that issue in a dax measure ?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Sep 2021 22:50:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/summing-qty-using-two-different-columns/m-p/2058160#M46412</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-09-05T22:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: summing qty using two different columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/summing-qty-using-two-different-columns/m-p/2058409#M46417</link>
      <description>&lt;P&gt;&lt;SPAN&gt;SUMX(VALUES(Planilha1[QuotationID]),VAR _c=Planilha1[QuotationID] RETURN MAXX(TOPN(1,FILTER(Planilha1,Planilha1[QuotationID]=_c),Planilha1[Revision],ASC),Planilha1[Vehicle QTY]))&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Sep 2021 02:47:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/summing-qty-using-two-different-columns/m-p/2058409#M46417</guid>
      <dc:creator>wdx223_Daniel</dc:creator>
      <dc:date>2021-09-06T02:47:22Z</dc:date>
    </item>
  </channel>
</rss>

