<?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 distinct sum with filter in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-distinct-sum-with-filter/m-p/3297064#M122854</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="474030" data-lia-user-login="jvrnicfi" class="lia-mention lia-mention-user"&gt;jvrnicfi&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please try&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;TPO hours =
SUMX (
    SUMMARIZE (
        FILTER ( 'Table', 'Table'[SOURCE] = "WORKORDER" ),
        'Table'[WRKNR],
        'Table'[WRKROW],
        "@TPOH", SUMX ( TOPN ( 1, 'Table', 'Table'[PARTSROW], ASC ), 'Table'[TPOH] ),
        "@TPOPROS", SUMX ( TOPN ( 1, 'Table', 'Table'[PARTSROW], ASC ), 'Table'[TPOPROS] )
    ),
    [@TPOH] * [@TPOPROS] / 100
)&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 22 Jun 2023 06:50:24 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2023-06-22T06:50:24Z</dc:date>
    <item>
      <title>How to calculate distinct sum with filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-distinct-sum-with-filter/m-p/3294968#M122724</link>
      <description>&lt;P&gt;Hi there, newbie questons&lt;/P&gt;&lt;P&gt;I have flat datatable (800 thousand rows)&lt;/P&gt;&lt;P&gt;I want the sum DISTINCT PLACE,WRKNR,WRKROW,MECHANIC WHERE SOURCE = WORKORDER&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;something like this:&lt;BR /&gt;SELECT DISTINCT PLACE,WRKNR,WRKROW,MECHANIC&lt;BR /&gt;CALCULATE SUM(TPOH * TPOPROS / 100)&lt;BR /&gt;WHERE SOURCE is WORKORDER&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But how?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2023 04:34:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-distinct-sum-with-filter/m-p/3294968#M122724</guid>
      <dc:creator>jvrnicfi</dc:creator>
      <dc:date>2023-06-22T04:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate distinct sum with filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-distinct-sum-with-filter/m-p/3295018#M122728</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="474030" data-lia-user-login="jvrnicfi" class="lia-mention lia-mention-user"&gt;jvrnicfi&lt;/a&gt;&amp;nbsp;for sum two columns and product betwen them you just need measure like&amp;nbsp;&lt;SPAN&gt;Sum Measure. In visual select wanted column. I hope this help&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sum Measure = &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SUMX ( &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FILTER ( WORKORDER, WORKORDER[SOURCE] = "WORKORDER" ), &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;WORKORDER[TPOH] * WORKORDER[TPOPROS]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2023 08:49:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-distinct-sum-with-filter/m-p/3295018#M122728</guid>
      <dc:creator>some_bih</dc:creator>
      <dc:date>2023-06-21T08:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate distinct sum with filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-distinct-sum-with-filter/m-p/3295043#M122729</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Total = [TPOH] * [TPOPROS]&lt;BR /&gt;CALCULATE(SUM([Total]), FILTER('TableName', DISTINCT([Source]) = "WORKOREDER"))&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2023 08:59:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-distinct-sum-with-filter/m-p/3295043#M122729</guid>
      <dc:creator>devanshi</dc:creator>
      <dc:date>2023-06-21T08:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate distinct sum with filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-distinct-sum-with-filter/m-p/3295269#M122753</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="474030" data-lia-user-login="jvrnicfi" class="lia-mention lia-mention-user"&gt;jvrnicfi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;TPO hours =
SUMX (
    FILTER ( 'Table', 'Table'[SOURCE] = "WORKORDER" ),
    'Table'[TPOH] * 'Table'[TPOPROS] / 100
)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 21 Jun 2023 10:36:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-distinct-sum-with-filter/m-p/3295269#M122753</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-06-21T10:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate distinct sum with filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-distinct-sum-with-filter/m-p/3296905#M122837</link>
      <description>&lt;P&gt;Thank you for your answer, solution is correct. Result is same that my own answer example.&lt;/P&gt;&lt;P&gt;However i misleading my queston by my own answer. Thats why i change the picture to clarify my queston.&lt;/P&gt;&lt;P&gt;Main problem is how to calculate with distinct columns (there is many lines that must be ignored)&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2023 04:42:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-distinct-sum-with-filter/m-p/3296905#M122837</guid>
      <dc:creator>jvrnicfi</dc:creator>
      <dc:date>2023-06-22T04:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate distinct sum with filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-distinct-sum-with-filter/m-p/3296906#M122838</link>
      <description>&lt;P&gt;Thank you for your answer, solution is correct. Result is same that my own answer example.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do the same focus as I did for "tamerj1"&lt;/P&gt;&lt;P&gt;However i misleading my queston by my own answer. Thats why i change the picture to clarify my queston.&lt;/P&gt;&lt;P&gt;Main problem is how to calculate with distinct columns (there is many lines that must be ignored)&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2023 04:44:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-distinct-sum-with-filter/m-p/3296906#M122838</guid>
      <dc:creator>jvrnicfi</dc:creator>
      <dc:date>2023-06-22T04:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate distinct sum with filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-distinct-sum-with-filter/m-p/3296907#M122839</link>
      <description>&lt;P&gt;Thank you for your answer, solution is correct. Result is same that my own answer example.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do the same focus as I did for "tamerj1"&lt;/P&gt;&lt;P&gt;However i misleading my queston by my own answer. Thats why i change the picture to clarify my queston.&lt;/P&gt;&lt;P&gt;Main problem is how to calculate with distinct columns (there is many lines that must be ignored)&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2023 04:44:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-distinct-sum-with-filter/m-p/3296907#M122839</guid>
      <dc:creator>jvrnicfi</dc:creator>
      <dc:date>2023-06-22T04:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate distinct sum with filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-distinct-sum-with-filter/m-p/3297064#M122854</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="474030" data-lia-user-login="jvrnicfi" class="lia-mention lia-mention-user"&gt;jvrnicfi&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please try&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;TPO hours =
SUMX (
    SUMMARIZE (
        FILTER ( 'Table', 'Table'[SOURCE] = "WORKORDER" ),
        'Table'[WRKNR],
        'Table'[WRKROW],
        "@TPOH", SUMX ( TOPN ( 1, 'Table', 'Table'[PARTSROW], ASC ), 'Table'[TPOH] ),
        "@TPOPROS", SUMX ( TOPN ( 1, 'Table', 'Table'[PARTSROW], ASC ), 'Table'[TPOPROS] )
    ),
    [@TPOH] * [@TPOPROS] / 100
)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 22 Jun 2023 06:50:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-distinct-sum-with-filter/m-p/3297064#M122854</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-06-22T06:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate distinct sum with filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-distinct-sum-with-filter/m-p/3297120#M122860</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Try this once,&lt;BR /&gt;DistinctSum = CALCULATE( SUM('Table'[TPOH] * 'Table'[TPOPROS] / 100),&lt;BR /&gt;'Table'[SOURCE] = "WORKORDER",&lt;BR /&gt;ALLEXCEPT('Table', 'Table'[PLACE], 'Table'[WRKNR], 'Table'[WRKROW], 'Table'[MECHANIC]) )&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2023 07:09:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-calculate-distinct-sum-with-filter/m-p/3297120#M122860</guid>
      <dc:creator>devanshi</dc:creator>
      <dc:date>2023-06-22T07:09:15Z</dc:date>
    </item>
  </channel>
</rss>

