<?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: Need DAX help on Calculate, Count and Filter Functionality in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-DAX-help-on-Calculate-Count-and-Filter-Functionality/m-p/2992929#M100751</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is very to hard to understand. IF possible can you explain the conditions in points.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nikhil Chenna&lt;/P&gt;</description>
    <pubDate>Thu, 29 Dec 2022 08:30:35 GMT</pubDate>
    <dc:creator>NikhilChenna</dc:creator>
    <dc:date>2022-12-29T08:30:35Z</dc:date>
    <item>
      <title>Need DAX help on Calculate, Count and Filter Functionality</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-DAX-help-on-Calculate-Count-and-Filter-Functionality/m-p/2992189#M100706</link>
      <description>&lt;P&gt;I've tried an IF(AND and CALCULATE(COUNT but I am struggling to find how to exclude the possibility of some variables in a count formula.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to return everything in a Column (Action Code) that is "UC" only for a specific prem # (in the left hand column).&lt;/P&gt;&lt;P&gt;In the Matrix. UC is a Count of the Action Code.&lt;/P&gt;&lt;P&gt;In some cases, the Prem # will pull in multiple Action Codes too. So I will get a UC with SC, but I need those omitted and only show UC and null(blank) elsewhere. Maybe I am overthinking the DAX, but I am struggling on this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have at least gotten the UC's to all appear in the formula below, but need some assistance in getting the other Action Codes removed. I know I need to Filter out the counts, but unsure how to do this. Such as if UC and SC are both 1 counts, they will be removed from the matrix.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;COUNTA&lt;/SPAN&gt;&lt;SPAN&gt;('DataSet'[CRDT_COLL_ACTN_CD]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 'DataSet'[CRDT_COLL_ACTN_CD] &lt;/SPAN&gt;&lt;SPAN&gt;IN&lt;/SPAN&gt;&lt;SPAN&gt; { &lt;/SPAN&gt;&lt;SPAN&gt;"UC"&lt;/SPAN&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Dec 2022 21:16:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-DAX-help-on-Calculate-Count-and-Filter-Functionality/m-p/2992189#M100706</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-28T21:16:17Z</dc:date>
    </item>
    <item>
      <title>Re: Need DAX help on Calculate, Count and Filter Functionality</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-DAX-help-on-Calculate-Count-and-Filter-Functionality/m-p/2992278#M100714</link>
      <description>&lt;P&gt;I've added more context above. If anyone can help it would greatly be appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Dec 2022 21:36:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-DAX-help-on-Calculate-Count-and-Filter-Functionality/m-p/2992278#M100714</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-28T21:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: Need DAX help on Calculate, Count and Filter Functionality</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-DAX-help-on-Calculate-Count-and-Filter-Functionality/m-p/2992923#M100750</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not sure I understood your question correctly, you mean in the above figure, the 045485994 and 045612820 rows don't want to be displayed in the matrix?&lt;/P&gt;
&lt;P&gt;And could you please give me some sample data to test? Please delete sensitive and private data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _Yinliw&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Dec 2022 08:27:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-DAX-help-on-Calculate-Count-and-Filter-Functionality/m-p/2992923#M100750</guid>
      <dc:creator>v-yinliw-msft</dc:creator>
      <dc:date>2022-12-29T08:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Need DAX help on Calculate, Count and Filter Functionality</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-DAX-help-on-Calculate-Count-and-Filter-Functionality/m-p/2992929#M100751</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is very to hard to understand. IF possible can you explain the conditions in points.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nikhil Chenna&lt;/P&gt;</description>
      <pubDate>Thu, 29 Dec 2022 08:30:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-DAX-help-on-Calculate-Count-and-Filter-Functionality/m-p/2992929#M100751</guid>
      <dc:creator>NikhilChenna</dc:creator>
      <dc:date>2022-12-29T08:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: Need DAX help on Calculate, Count and Filter Functionality</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-DAX-help-on-Calculate-Count-and-Filter-Functionality/m-p/2993375#M100768</link>
      <description>&lt;P&gt;I cannot send data on this, sorry. I can try to explain better. If the chart below was an Excel Pivot Table, I would need to filter out the counts of DN and SC, thus eliminating the UC as well. These are duplicate Prem_NB. Although I need all the data, so I cannot remove duplicates either using Power Query. I just do not want the duplicate PREM_NB to show up, so I would be left with a count of 12 in UC.&lt;/P&gt;&lt;P&gt;So while this formula gets me about halfway there, I need a filter(?) formula to take out the counts of the other action codes (DN/SC) and also the UC if they have one. The duplicate prem_nb are 042016185, 045485994, 045612820.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&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;COUNTA&lt;/SPAN&gt;&lt;SPAN&gt;('DataSet'[CRDT_COLL_ACTN_CD]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 'DataSet'[CRDT_COLL_ACTN_CD]&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;IN&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;{&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"UC"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Dec 2022 13:59:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-DAX-help-on-Calculate-Count-and-Filter-Functionality/m-p/2993375#M100768</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-29T13:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: Need DAX help on Calculate, Count and Filter Functionality</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-DAX-help-on-Calculate-Count-and-Filter-Functionality/m-p/2993564#M100775</link>
      <description>&lt;P&gt;&lt;SPAN&gt;PREM_NB ORDR_NB ACTN_CD&lt;BR /&gt;040499503 049979553 UC&lt;BR /&gt;041496276 044247981 UC&lt;BR /&gt;041618911 043573555 UC&lt;BR /&gt;041717966 042658832 UC&lt;BR /&gt;042001243 042886126 UC&lt;BR /&gt;042016185 048866316 DN&lt;BR /&gt;042016185 041670231 UC&lt;BR /&gt;042652002 041132464 UC&lt;BR /&gt;043105966 043785616 UC&lt;BR /&gt;043289966 045280766 UC&lt;BR /&gt;044296966 043610958 UC&lt;BR /&gt;044916627 047529882 UC&lt;BR /&gt;044998403 042261670 UC&lt;BR /&gt;045485994 041311258 UC&lt;BR /&gt;045485994 043584388 SC&lt;BR /&gt;045612820 046053949 UC&lt;BR /&gt;045612820 049905916 SC&lt;BR /&gt;048833971 043678617 UC&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here is a mockup of data that could help. There are three duplicate PREM_NB that have separate order numbers. I would need those to not come through in the matrix in Power BI. Even though they have an ACTN_CD of UC, I would want those omitted. I think by doing the count on the ACTN_CD it's not working, although I cannot figure out my filter or anything.&lt;/SPAN&gt;&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;</description>
      <pubDate>Thu, 29 Dec 2022 15:07:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-DAX-help-on-Calculate-Count-and-Filter-Functionality/m-p/2993564#M100775</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-29T15:07:58Z</dc:date>
    </item>
    <item>
      <title>Re: Need DAX help on Calculate, Count and Filter Functionality</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-DAX-help-on-Calculate-Count-and-Filter-Functionality/m-p/2994318#M100840</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;Please use&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Count = 
CALCULATE(
    COUNTA ( 'DataSet'[CRDT_COLL_ACTN_CD] ),
    KEEPFILTERS ( 'DataSet'[CRDT_COLL_ACTN_CD] = "UC" )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 30 Dec 2022 05:38:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-DAX-help-on-Calculate-Count-and-Filter-Functionality/m-p/2994318#M100840</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-12-30T05:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: Need DAX help on Calculate, Count and Filter Functionality</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-DAX-help-on-Calculate-Count-and-Filter-Functionality/m-p/2994837#M100871</link>
      <description>&lt;P&gt;Thanks for the reply. Tried that one as well, but I need the filter to remove anything that has a count in the UC and SC &amp;amp; UC and DN as well. So this gets me halfway there, but not fully. I'm not sure how to write the code as a combination, even if there are duplicate PREM_NB.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Dec 2022 12:45:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-DAX-help-on-Calculate-Count-and-Filter-Functionality/m-p/2994837#M100871</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-30T12:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: Need DAX help on Calculate, Count and Filter Functionality</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-DAX-help-on-Calculate-Count-and-Filter-Functionality/m-p/2994867#M100872</link>
      <description>&lt;P&gt;&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;Not sure if I correctly understand your requirement. Hope this is what you need. See Attached sample file.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Count = 
SUMX (
    VALUES ( 'DataSet'[PREM_NB] ),
    IF (
        COUNTROWS ( 
            CALCULATETABLE ( 
                VALUES ( 'DataSet'[CRDT_COLL_ACTN_CD] ), 
                ALL ( 'DataSet'[CRDT_COLL_ACTN_CD] ) 
            ) 
        ) &amp;lt;= 1,
        CALCULATE ( COUNTA('DataSet'[CRDT_COLL_ACTN_CD]) )
    )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 30 Dec 2022 13:21:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-DAX-help-on-Calculate-Count-and-Filter-Functionality/m-p/2994867#M100872</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-12-30T13:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: Need DAX help on Calculate, Count and Filter Functionality</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-DAX-help-on-Calculate-Count-and-Filter-Functionality/m-p/2995079#M100889</link>
      <description>&lt;P&gt;This seems to have worked for me. Thank you so much!&lt;/P&gt;</description>
      <pubDate>Fri, 30 Dec 2022 15:35:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-DAX-help-on-Calculate-Count-and-Filter-Functionality/m-p/2995079#M100889</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-30T15:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: Need DAX help on Calculate, Count and Filter Functionality</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-DAX-help-on-Calculate-Count-and-Filter-Functionality/m-p/3009812#M102010</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Just have one quick question I need help on with the formula above. While the formula works as intended, I am having one slight issue with the duplicates being omitted from the sum. For example:&lt;/P&gt;&lt;P&gt;This is correct if I am trying to break this down by a weekly count.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;When I layer month in, it once again works correctly, taking the 8 out of January in a week that stretches into two months&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;But when I condense it to show the month only, I get a smaller number:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;By doing the quick math it should be 293, but because of the duplicate PREM_NB, there are 55 that are omitted in the 'sum' by month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help on this? I would think it's an easy fix in the formula, but I am unsure...&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2023 21:05:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-DAX-help-on-Calculate-Count-and-Filter-Functionality/m-p/3009812#M102010</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-09T21:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: Need DAX help on Calculate, Count and Filter Functionality</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-DAX-help-on-Calculate-Count-and-Filter-Functionality/m-p/3011354#M102095</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try&lt;/P&gt;
&lt;P&gt;Count =&lt;BR /&gt;SUMX (&lt;BR /&gt;SUMMARIZE ( 'DataSet', 'DataSet'[PREM_NB], 'Date'[Week] ),&lt;BR /&gt;IF (&lt;BR /&gt;COUNTROWS (&lt;BR /&gt;CALCULATETABLE (&lt;BR /&gt;VALUES ( 'DataSet'[CRDT_COLL_ACTN_CD] ),&lt;BR /&gt;ALL ( 'DataSet'[CRDT_COLL_ACTN_CD] )&lt;BR /&gt;)&lt;BR /&gt;) &amp;lt;= 1,&lt;BR /&gt;CALCULATE ( COUNTA ( 'DataSet'[CRDT_COLL_ACTN_CD] ) )&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2023 14:23:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-DAX-help-on-Calculate-Count-and-Filter-Functionality/m-p/3011354#M102095</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-01-10T14:23:38Z</dc:date>
    </item>
  </channel>
</rss>

