<?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: Count measure that doesn't change when new fields are added in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-measure-that-doesn-t-change-when-new-fields-are-added/m-p/2805677#M88468</link>
    <description>&lt;P&gt;The columns you add into the table visual from the Forms table are acting as filters, so only one form is visible at a time. Try&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Number of Forms submitted =
CALCULATE (
    COUNT ( Formtable[FormID] ),
    ALLEXCEPT ( Accounts, Accounts[AccountID] )
)
&lt;/LI-CODE&gt;
&lt;P&gt;If you know that there will be only 1 entry per form in the Forms table then COUNTROWS(Formtable) would be better than the current COUNT.&lt;/P&gt;</description>
    <pubDate>Thu, 29 Sep 2022 09:19:19 GMT</pubDate>
    <dc:creator>johnt75</dc:creator>
    <dc:date>2022-09-29T09:19:19Z</dc:date>
    <item>
      <title>Count measure that doesn't change when new fields are added</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-measure-that-doesn-t-change-when-new-fields-are-added/m-p/2803965#M88340</link>
      <description>&lt;P&gt;I'm working on a query to identify accounts that have not submitted another form so that we can contact them and either deactivate the account or have them submit a new form for approval. This is a sample of the data I'm working with. The AccountID comes from the Accounts table and the FormID and form information from the Form table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;AccountID&lt;/TD&gt;&lt;TD&gt;FormID&lt;/TD&gt;&lt;TD&gt;Form Submitted On&lt;/TD&gt;&lt;TD&gt;Form Status&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C222333&lt;/TD&gt;&lt;TD&gt;F45645634&lt;/TD&gt;&lt;TD&gt;12-Apr-21&lt;/TD&gt;&lt;TD&gt;Processed&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C222333&lt;/TD&gt;&lt;TD&gt;F79230488&lt;/TD&gt;&lt;TD&gt;10-Apr-22&lt;/TD&gt;&lt;TD&gt;Pending&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C455345&lt;/TD&gt;&lt;TD&gt;F89494345&lt;/TD&gt;&lt;TD&gt;21-Jun-21&lt;/TD&gt;&lt;TD&gt;Processed&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C455345&lt;/TD&gt;&lt;TD&gt;F73423060&lt;/TD&gt;&lt;TD&gt;15-Jun-22&lt;/TD&gt;&lt;TD&gt;Pending&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C783434&lt;/TD&gt;&lt;TD&gt;F56943005&lt;/TD&gt;&lt;TD&gt;21-Oct-21&lt;/TD&gt;&lt;TD&gt;Processed&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C543405&lt;/TD&gt;&lt;TD&gt;F34549545&lt;/TD&gt;&lt;TD&gt;01-Aug-21&lt;/TD&gt;&lt;TD&gt;Processed&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C093943&lt;/TD&gt;&lt;TD&gt;F23435923&lt;/TD&gt;&lt;TD&gt;15-Mar-21&lt;/TD&gt;&lt;TD&gt;Processed&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C093943&lt;/TD&gt;&lt;TD&gt;F80349559&lt;/TD&gt;&lt;TD&gt;18-Apr-22&lt;/TD&gt;&lt;TD&gt;Pending&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My initial approach was to create a measure to count how many forms each account has submitted and filtering for those that have only submitted 1 form, I want to see when they submitted it and what the status is. I used this measure for the count:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Number of Forms submitted =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;COUNT&lt;/SPAN&gt;&lt;SPAN&gt;(Formtable[FormID]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;GROUPBY&lt;/SPAN&gt;&lt;SPAN&gt;(Accounts, Accounts[AccountID]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;then I used the Filters to select&amp;nbsp;Number of Forms submitted is 1.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when I try to see the Status and submitted date of these applications this is what I get&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;AccountID&lt;/TD&gt;&lt;TD&gt;Number of Forms submitted&lt;/TD&gt;&lt;TD&gt;Form Submitted On&lt;/TD&gt;&lt;TD&gt;Form Status&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C222333&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;12-Apr-21&lt;/TD&gt;&lt;TD&gt;Processed&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C222333&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;10-Apr-22&lt;/TD&gt;&lt;TD&gt;Pending&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C455345&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;21-Jun-21&lt;/TD&gt;&lt;TD&gt;Processed&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C455345&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;15-Jun-22&lt;/TD&gt;&lt;TD&gt;Pending&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C783434&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;21-Oct-21&lt;/TD&gt;&lt;TD&gt;Processed&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C543405&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;01-Aug-21&lt;/TD&gt;&lt;TD&gt;Processed&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C093943&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;15-Mar-21&lt;/TD&gt;&lt;TD&gt;Processed&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C093943&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;18-Apr-22&lt;/TD&gt;&lt;TD&gt;Pending&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which is not correct because only accounts&amp;nbsp;C783434 and&amp;nbsp;C543405 have 1 form. So the desired state would be&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;AccountID&lt;/TD&gt;&lt;TD&gt;Number of Forms submitted&lt;/TD&gt;&lt;TD&gt;Form Submitted On&lt;/TD&gt;&lt;TD&gt;Form Status&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C783434&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;21-Oct-21&lt;/TD&gt;&lt;TD&gt;Processed&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C543405&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;01-Aug-21&lt;/TD&gt;&lt;TD&gt;Processed&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've found that when I remove the submitted on and Form Status fields, then the data looks like it should and the counts are accurate, but when I add either of these two fields it shows all the accounts with the forms submitted as 1.&amp;nbsp; I'm sure there's something wrong with my measure, I'd really appreciate some guidance on getting the desired result.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2022 19:49:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-measure-that-doesn-t-change-when-new-fields-are-added/m-p/2803965#M88340</guid>
      <dc:creator>Nels921</dc:creator>
      <dc:date>2022-09-28T19:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: Count measure that doesn't change when new fields are added</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-measure-that-doesn-t-change-when-new-fields-are-added/m-p/2805677#M88468</link>
      <description>&lt;P&gt;The columns you add into the table visual from the Forms table are acting as filters, so only one form is visible at a time. Try&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Number of Forms submitted =
CALCULATE (
    COUNT ( Formtable[FormID] ),
    ALLEXCEPT ( Accounts, Accounts[AccountID] )
)
&lt;/LI-CODE&gt;
&lt;P&gt;If you know that there will be only 1 entry per form in the Forms table then COUNTROWS(Formtable) would be better than the current COUNT.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 09:19:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-measure-that-doesn-t-change-when-new-fields-are-added/m-p/2805677#M88468</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-09-29T09:19:19Z</dc:date>
    </item>
  </channel>
</rss>

