<?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 Multiple tables adding numeric number once per table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-tables-adding-numeric-number-once-per-table/m-p/3426786#M129846</link>
    <description>&lt;P&gt;Hello, I have a question I just cant figure out. I have my powerbi with a field I named EWS Score in each table. I have my calculated field working across all tables and my measure. However, having 4 tables representing categories, how would I add this up so it counts each person once per table where the value would be 1 to 4? I need to see all places these individuals have two or more categories ( each category is its own table.) As in example if I were in table 1 8 times and table two zero times and table three 2 times and table four 1 time, my count would be 3. I would then apply a slicer so the users can control their count visuals. I am fairly new so an example goes a long way currently.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;4 tables&lt;/STRONG&gt; - ( Table_A, Table_B, Table_C, Table_D) -&lt;/P&gt;&lt;P&gt;count only if EWS Score =1 and count once per table&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(Would this stand anone or be placed in my table I where I put the outher two items as a measure and a calculated field?)&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Sep 2023 16:23:11 GMT</pubDate>
    <dc:creator>MichaelC18</dc:creator>
    <dc:date>2023-09-12T16:23:11Z</dc:date>
    <item>
      <title>Multiple tables adding numeric number once per table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-tables-adding-numeric-number-once-per-table/m-p/3426786#M129846</link>
      <description>&lt;P&gt;Hello, I have a question I just cant figure out. I have my powerbi with a field I named EWS Score in each table. I have my calculated field working across all tables and my measure. However, having 4 tables representing categories, how would I add this up so it counts each person once per table where the value would be 1 to 4? I need to see all places these individuals have two or more categories ( each category is its own table.) As in example if I were in table 1 8 times and table two zero times and table three 2 times and table four 1 time, my count would be 3. I would then apply a slicer so the users can control their count visuals. I am fairly new so an example goes a long way currently.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;4 tables&lt;/STRONG&gt; - ( Table_A, Table_B, Table_C, Table_D) -&lt;/P&gt;&lt;P&gt;count only if EWS Score =1 and count once per table&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(Would this stand anone or be placed in my table I where I put the outher two items as a measure and a calculated field?)&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 16:23:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-tables-adding-numeric-number-once-per-table/m-p/3426786#M129846</guid>
      <dc:creator>MichaelC18</dc:creator>
      <dc:date>2023-09-12T16:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple tables adding numeric number once per table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-tables-adding-numeric-number-once-per-table/m-p/3426804#M129848</link>
      <description>&lt;P&gt;DAX Measure for counting individuals across tables&lt;/P&gt;&lt;LI-CODE lang="python"&gt;TotalUniqueCounts = 
VAR CountTableA = CALCULATE(COUNTROWS(SUMMARIZE(Table_A, Table_A[PersonID])), Table_A[EWS Score] = 1)
VAR CountTableB = CALCULATE(COUNTROWS(SUMMARIZE(Table_B, Table_B[PersonID])), Table_B[EWS Score] = 1)
VAR CountTableC = CALCULATE(COUNTROWS(SUMMARIZE(Table_C, Table_C[PersonID])), Table_C[EWS Score] = 1)
VAR CountTableD = CALCULATE(COUNTROWS(SUMMARIZE(Table_D, Table_D[PersonID])), Table_D[EWS Score] = 1)

RETURN
CountTableA + CountTableB + CountTableC + CountTableD&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Explanation:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;STRONG&gt;SUMMARIZE&lt;/STRONG&gt;: This function is used to create a table with unique PersonID for each table.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;COUNTROWS&lt;/STRONG&gt;: Counts the number of rows in the summarized table, effectively counting each individual once.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;CALCULATE&lt;/STRONG&gt;: Modifies the filter context to include only rows where "EWS Score = 1."&lt;/LI&gt;&lt;LI&gt;The &lt;STRONG&gt;VAR&lt;/STRONG&gt; statements calculate the counts for each table separately.&lt;/LI&gt;&lt;LI&gt;The &lt;STRONG&gt;RETURN&lt;/STRONG&gt; statement sums these counts to give you the total count across all tables.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Style Guide Reference:&lt;BR /&gt;For DAX best practices, you can refer to the SQLBI DAX Coding Guidelines: &lt;A href="https://www.sqlbi.com/articles/dax-coding-style/" target="_self"&gt;SQLBI DAX Guidelines.&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 16:34:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-tables-adding-numeric-number-once-per-table/m-p/3426804#M129848</guid>
      <dc:creator>MargusMartsepp</dc:creator>
      <dc:date>2023-09-12T16:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple tables adding numeric number once per table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-tables-adding-numeric-number-once-per-table/m-p/3426865#M129857</link>
      <description>&lt;P&gt;I have tried it multiple times but I get an error. Did i misunderstannd an item. Those were genrric variables correct? You can leave those as they are?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;TotalUniqueCounts = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt; CountTableA = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;COUNTROWS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUMMARIZE&lt;/SPAN&gt;&lt;SPAN&gt;('Attendance',Attendance[OTHER-ID])), Attendance[EWS Score]= &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt; CountTableB = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;COUNTROWS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUMMARIZE&lt;/SPAN&gt;&lt;SPAN&gt;('Discipline Datamining', 'Discipline Datamining'[Other ID])), 'Discipline Datamining'[EWS Score] = &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt; CountTableC = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;COUNTROWS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUMMARIZE&lt;/SPAN&gt;&lt;SPAN&gt;('EWS POSTED GRADES', 'EWS POSTED GRADES'[Stdt ID])), 'EWS POSTED GRADES'[EWS Score] = &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt; CountTableD = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;COUNTROWS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUMMARIZE&lt;/SPAN&gt;&lt;SPAN&gt;(TEST_SCORES_ELAMATLEVELS, TEST_SCORES_ELAMATLEVELS[Other ID])), TEST_SCORES_ELAMATLEVELS[EWS Score] = &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CountTableA + CountTableB + CountTableC + CountTableD&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 12 Sep 2023 17:06:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-tables-adding-numeric-number-once-per-table/m-p/3426865#M129857</guid>
      <dc:creator>MichaelC18</dc:creator>
      <dc:date>2023-09-12T17:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple tables adding numeric number once per table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-tables-adding-numeric-number-once-per-table/m-p/3426874#M129861</link>
      <description>&lt;P&gt;Use &lt;STRONG&gt;FILTER&lt;/STRONG&gt; with &lt;STRONG&gt;ALL&lt;/STRONG&gt; to ensure that you're working with a valid table expression.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TotalUniqueCounts =
VAR CountTableA = CALCULATE(COUNTROWS('Attendance'), FILTER(ALL('Attendance'[OTHER-ID]), 'Attendance'[EWS Score] = 1))
VAR CountTableB = CALCULATE(COUNTROWS('Discipline Datamining'), FILTER(ALL('Discipline Datamining'[Other ID]), 'Discipline Datamining'[EWS Score] = 1))
VAR CountTableC = CALCULATE(COUNTROWS('EWS POSTED GRADES'), FILTER(ALL('EWS POSTED GRADES'[Stdt ID]), 'EWS POSTED GRADES'[EWS Score] = 1))
VAR CountTableD = CALCULATE(COUNTROWS(TEST_SCORES_ELAMATLEVELS), FILTER(ALL(TEST_SCORES_ELAMATLEVELS[Other ID]), TEST_SCORES_ELAMATLEVELS[EWS Score] = 1))

RETURN
CountTableA + CountTableB + CountTableC + CountTableD&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 17:11:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-tables-adding-numeric-number-once-per-table/m-p/3426874#M129861</guid>
      <dc:creator>MargusMartsepp</dc:creator>
      <dc:date>2023-09-12T17:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple tables adding numeric number once per table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-tables-adding-numeric-number-once-per-table/m-p/3426966#M129875</link>
      <description>&lt;P&gt;I still get an error. Not sure why this one seems to be fighting me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 18:27:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-tables-adding-numeric-number-once-per-table/m-p/3426966#M129875</guid>
      <dc:creator>MichaelC18</dc:creator>
      <dc:date>2023-09-12T18:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple tables adding numeric number once per table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-tables-adding-numeric-number-once-per-table/m-p/3436153#M130380</link>
      <description>&lt;P&gt;Does anyone have an answer for me for this report? I basically need the distince student to count once if on that report then add up for a sum of the four tables getting a score of 1 to 4. The current solutions are not running they errored out.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 12:31:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-tables-adding-numeric-number-once-per-table/m-p/3436153#M130380</guid>
      <dc:creator>MichaelC18</dc:creator>
      <dc:date>2023-09-18T12:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple tables adding numeric number once per table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-tables-adding-numeric-number-once-per-table/m-p/3436553#M130412</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I have the following up and running but my Attendance table has a score column. In Excel and SQL I can use a where clause (Where EWS Score =1) but in Dax how would I apply this to my attendance line only?TOTAL EWS POINTS = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ( &lt;/SPAN&gt;&lt;SPAN&gt;SUMX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;VALUES&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Attendance&lt;/SPAN&gt;&lt;SPAN&gt;[OTHER-ID]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; (&lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DISTINCTCOUNT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Attendance&lt;/SPAN&gt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nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 18 Sep 2023 14:52:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-tables-adding-numeric-number-once-per-table/m-p/3436553#M130412</guid>
      <dc:creator>MichaelC18</dc:creator>
      <dc:date>2023-09-18T14:52:31Z</dc:date>
    </item>
  </channel>
</rss>

