<?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: Virtual Table Row Count with Boolean Expression in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Virtual-Table-Row-Count-with-Boolean-Expression/m-p/2446843#M65707</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="212056" data-lia-user-login="klopdaddy" class="lia-mention lia-mention-user"&gt;klopdaddy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just replace CONTX with SUMX to cout the trure condition. Boolean condition can be summed. The sum would be the count of true cases as true is translated to 1.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 08 Apr 2022 20:50:41 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2022-04-08T20:50:41Z</dc:date>
    <item>
      <title>Virtual Table Row Count with Boolean Expression</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Virtual-Table-Row-Count-with-Boolean-Expression/m-p/2446794#M65700</link>
      <description>&lt;P&gt;Hello-&lt;/P&gt;&lt;P&gt;I am tryint to count the # of events by comparing two calculated measures and returning the count of only those rows that meet the condition. I've been trying via the DAX statement and creation of a virtual tabkle from a much larger SQL table. The below expression appears to ignore the results of the comparision and return all rows of the virtual table.&lt;/P&gt;&lt;P&gt;When i substitute the COUNTAX operator with a SUMX on the same calculated column (w/o the comparison) the statement returns the correct value. Any suggestions would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Event_Over_Budget_Count = CALCULATE(&lt;BR /&gt;COUNTAX(&lt;BR /&gt;SUMMARIZE(&lt;BR /&gt;table_A, table_A[eventName],&lt;BR /&gt;"Spend Ratio", DIVIDE&lt;BR /&gt;CALCULATE(&lt;BR /&gt;SUM (table_A[eventspend]), DATESINPERIOD(table_A[date], MAX(table_A[date]), -1, day)),&lt;BR /&gt;DIVIDE( MAX( table_A[budgetamt]), DATEDIFF(MIN(table_A[eventStartDate]), MAX(table_A[event[EndDate]), DAY) + 1))),&lt;BR /&gt;([Spend Ratio] &amp;gt;1 )), lookup_Table[event_active_flag] = "Y")&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2022 19:55:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Virtual-Table-Row-Count-with-Boolean-Expression/m-p/2446794#M65700</guid>
      <dc:creator>klopdaddy</dc:creator>
      <dc:date>2022-04-08T19:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: Virtual Table Row Count with Boolean Expression</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Virtual-Table-Row-Count-with-Boolean-Expression/m-p/2446823#M65702</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="212056" data-lia-user-login="klopdaddy" class="lia-mention lia-mention-user"&gt;klopdaddy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;COUNTX won't work with boolean condition. Boolean condition will return either one or zero and CONTX will count booth.&amp;nbsp;&lt;BR /&gt;As you've already mentioned in your post, SUMX will provide perfecr count of "1".&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2022 20:23:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Virtual-Table-Row-Count-with-Boolean-Expression/m-p/2446823#M65702</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-04-08T20:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: Virtual Table Row Count with Boolean Expression</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Virtual-Table-Row-Count-with-Boolean-Expression/m-p/2446839#M65704</link>
      <description>&lt;P&gt;Thanks for the quick response. Do you have any suggestions on how to count the number of rows of the virtual table that meet the conditions specified? I don't want the sum of the values from the expression i want to be able to compare each value to a criteria (in this case '1') and return a count of only those rows that meet the requirement. Do you know of a better strategy?&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Sean&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2022 20:41:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Virtual-Table-Row-Count-with-Boolean-Expression/m-p/2446839#M65704</guid>
      <dc:creator>klopdaddy</dc:creator>
      <dc:date>2022-04-08T20:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: Virtual Table Row Count with Boolean Expression</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Virtual-Table-Row-Count-with-Boolean-Expression/m-p/2446843#M65707</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="212056" data-lia-user-login="klopdaddy" class="lia-mention lia-mention-user"&gt;klopdaddy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just replace CONTX with SUMX to cout the trure condition. Boolean condition can be summed. The sum would be the count of true cases as true is translated to 1.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2022 20:50:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Virtual-Table-Row-Count-with-Boolean-Expression/m-p/2446843#M65707</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-04-08T20:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: Virtual Table Row Count with Boolean Expression</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Virtual-Table-Row-Count-with-Boolean-Expression/m-p/2446892#M65712</link>
      <description>&lt;P&gt;That worked with the help of an if statement in my virtual column to create the boolean output to sum.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2022 21:53:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Virtual-Table-Row-Count-with-Boolean-Expression/m-p/2446892#M65712</guid>
      <dc:creator>klopdaddy</dc:creator>
      <dc:date>2022-04-08T21:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: Virtual Table Row Count with Boolean Expression</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Virtual-Table-Row-Count-with-Boolean-Expression/m-p/2446919#M65715</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="212056" data-lia-user-login="klopdaddy" class="lia-mention lia-mention-user"&gt;klopdaddy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you find my reply helpful you may consider selecting it as acceptable solution. Thank you and have a great weekend!&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2022 22:08:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Virtual-Table-Row-Count-with-Boolean-Expression/m-p/2446919#M65715</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-04-08T22:08:57Z</dc:date>
    </item>
  </channel>
</rss>

