<?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 help with DAX to create a card identifying Count of employeeID with no sales in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-DAX-to-create-a-card-identifying-Count-of/m-p/4135701#M164276</link>
    <description>&lt;P&gt;Thanks everyone for your suggestions! couldnt have been able to do it without ur help.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Sep 2024 14:45:06 GMT</pubDate>
    <dc:creator>hong88</dc:creator>
    <dc:date>2024-09-05T14:45:06Z</dc:date>
    <item>
      <title>Need help with DAX to create a card identifying Count of employeeID with no sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-DAX-to-create-a-card-identifying-Count-of/m-p/4129610#M164008</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to this community, but I have read through a number of solutions and it was of great help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I currently have a problem figuring out how to create a card to identify the count of employees with 0 sales for both years and have worked in the company for more than 1 year.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created a little mock table with the relevant details.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I really hope someone can help me, I am truly at a loss at the moment.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Sep 2024 13:45:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-DAX-to-create-a-card-identifying-Count-of/m-p/4129610#M164008</guid>
      <dc:creator>hong88</dc:creator>
      <dc:date>2024-09-02T13:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with DAX to create a card identifying Count of employeeID with no sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-DAX-to-create-a-card-identifying-Count-of/m-p/4129646#M164011</link>
      <description>&lt;P&gt;Did you try to use the summarize function, with a filter in sales amount = 0 ?&lt;/P&gt;</description>
      <pubDate>Mon, 02 Sep 2024 14:00:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-DAX-to-create-a-card-identifying-Count-of/m-p/4129646#M164011</guid>
      <dc:creator>PabloVallejo12</dc:creator>
      <dc:date>2024-09-02T14:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with DAX to create a card identifying Count of employeeID with no sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-DAX-to-create-a-card-identifying-Count-of/m-p/4129670#M164013</link>
      <description>&lt;P&gt;I tried, but im a bit confused because the IDs appear twice and have to be filtered together, meaning if ID 2233 has 0 sales in 2022, but has 9915 in sales in 2023, it should not appear as an ID without sales for both years.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only ones that should be counted are IDs with both years = 0 and tenure &amp;gt; 1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried using CALCULATE(countrows(table),&lt;BR /&gt;filter(values(table[SalesAmount]),&lt;BR /&gt;Calculate(SUM(table[SalesAmount])=0)&lt;BR /&gt;&lt;BR /&gt;Basically what I got back are just the rows with 0, im not sure how to futher filter based on same employeeID for 2022 and 2023 = 0 and tenure &amp;gt;1.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Sep 2024 14:29:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-DAX-to-create-a-card-identifying-Count-of/m-p/4129670#M164013</guid>
      <dc:creator>hong88</dc:creator>
      <dc:date>2024-09-02T14:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with DAX to create a card identifying Count of employeeID with no sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-DAX-to-create-a-card-identifying-Count-of/m-p/4129687#M164018</link>
      <description>&lt;P&gt;Maybe you can create a measure for each sales year, and use it for filter&lt;/P&gt;</description>
      <pubDate>Mon, 02 Sep 2024 14:28:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-DAX-to-create-a-card-identifying-Count-of/m-p/4129687#M164018</guid>
      <dc:creator>PabloVallejo12</dc:creator>
      <dc:date>2024-09-02T14:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with DAX to create a card identifying Count of employeeID with no sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-DAX-to-create-a-card-identifying-Count-of/m-p/4129853#M164033</link>
      <description>&lt;P&gt;edit: I think ive partially solved it, still cant figure out how to group it by ID and filter it if both years = 0. But I've decided to filter twice by year and by tenure &amp;gt; 0.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help, ur ideas helped me think of alternative ways to analyse. But if anyone still knows the DAX for the original problem, I would be really interested to find out too&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Sep 2024 17:09:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-DAX-to-create-a-card-identifying-Count-of/m-p/4129853#M164033</guid>
      <dc:creator>hong88</dc:creator>
      <dc:date>2024-09-02T17:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with DAX to create a card identifying Count of employeeID with no sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-DAX-to-create-a-card-identifying-Count-of/m-p/4130129#M164045</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="800368" data-lia-user-login="hong88" class="lia-mention lia-mention-user"&gt;hong88&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try this:&lt;/P&gt;
&lt;P&gt;Here is the sample data:&lt;/P&gt;
&lt;P&gt;'Table':&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Then add a measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MEASURE =
VAR _vtable =
    FILTER (
        ADDCOLUMNS (
            'Table',
            "_Sumsales",
                CALCULATE (
                    SUM ( 'Table'[Sales Amount] ),
                    'Table'[EmployeeID] = EARLIER ( 'Table'[EmployeeID] )
                ),
            "_MaxTenure",
                CALCULATE (
                    MAX ( 'Table'[Tenure] ),
                    'Table'[EmployeeID] = EARLIER ( 'Table'[EmployeeID] )
                )
        ),
        [_MaxTenure] &amp;gt; 1
            &amp;amp;&amp;amp; [_Sumsales] = 0
    )
RETURN
    COUNTROWS ( SUMMARIZE ( _vtable, 'Table'[EmployeeID] ) )
&lt;/LI-CODE&gt;
&lt;P&gt;The variable [_vtable] returns:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;So the result is as follow:&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;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Zhengdong Xu&lt;BR /&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2024 01:35:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-DAX-to-create-a-card-identifying-Count-of/m-p/4130129#M164045</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-09-03T01:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with DAX to create a card identifying Count of employeeID with no sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-DAX-to-create-a-card-identifying-Count-of/m-p/4130209#M164047</link>
      <description>&lt;P&gt;hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="800368" data-lia-user-login="hong88" class="lia-mention lia-mention-user"&gt;hong88&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please check if this accomodate your need.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for count employee with zero sales in both year, create a new measure with following DAX.&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;Count =&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;_Sales&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SUMMARIZE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt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t;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;'Table'&lt;/SPAN&gt;&lt;SPAN&gt;[EmployeeID]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Return&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;COUNTROWS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;_Sales&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if you want to do with SUMMARIZE, then just copy that _Sales DAX into new table.&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;Summarize = &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SUMMARIZE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SUMMARIZE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'Table',&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'Table'[EmployeeID],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"Sum"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;('Table'[Sales Amount])&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Sum]=&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 'Table'[EmployeeID]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if you need another filter for Tenure&amp;gt;0, then just add that line inside the FILTER.&lt;BR /&gt;&lt;BR /&gt;Hope this will help.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 03 Sep 2024 02:36:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-DAX-to-create-a-card-identifying-Count-of/m-p/4130209#M164047</guid>
      <dc:creator>Irwan</dc:creator>
      <dc:date>2024-09-03T02:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with DAX to create a card identifying Count of employeeID with no sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-DAX-to-create-a-card-identifying-Count-of/m-p/4135701#M164276</link>
      <description>&lt;P&gt;Thanks everyone for your suggestions! couldnt have been able to do it without ur help.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 14:45:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-DAX-to-create-a-card-identifying-Count-of/m-p/4135701#M164276</guid>
      <dc:creator>hong88</dc:creator>
      <dc:date>2024-09-05T14:45:06Z</dc:date>
    </item>
  </channel>
</rss>

