<?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 employee with multiple assignments only one time in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-employee-with-multiple-assignments-only-one-time/m-p/1507743#M29228</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="271871" data-lia-user-login="lhughes1" class="lia-mention lia-mention-user"&gt;lhughes1&lt;/a&gt; , Try a measure like&lt;/P&gt;
&lt;P&gt;countx(filter(summarize(Table[employee number],"_1", count(Table[Assignments])),[_1]&amp;gt;1),[employee number])&lt;/P&gt;</description>
    <pubDate>Fri, 20 Nov 2020 15:28:00 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2020-11-20T15:28:00Z</dc:date>
    <item>
      <title>Count employee with multiple assignments only one time</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-employee-with-multiple-assignments-only-one-time/m-p/1507635#M29223</link>
      <description>&lt;P&gt;My data set has mixed granularity.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;For salary calculations this is fine because I need to use all 3 lines.&lt;/P&gt;&lt;P&gt;For health, however, I only want to count the amount one time.&lt;/P&gt;&lt;P&gt;In Excel, I added a column to identify only the first line for each employee. Later, I used that column in the health calculations.&lt;/P&gt;&lt;P&gt;The formula I used was =IF(COUNTIF($B$3:B3,B3)=1,1,0)&lt;/P&gt;&lt;P&gt;Now I've migrated to a data model and need to add a similar calculated column.&lt;/P&gt;&lt;P&gt;What is the DAX translation for the Excel formula above?&lt;/P&gt;&lt;P&gt;Or is there a better way to accomplish this goal?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2020 14:46:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-employee-with-multiple-assignments-only-one-time/m-p/1507635#M29223</guid>
      <dc:creator>lhughes1</dc:creator>
      <dc:date>2020-11-20T14:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: Count employee with multiple assignments only one time</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-employee-with-multiple-assignments-only-one-time/m-p/1507743#M29228</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="271871" data-lia-user-login="lhughes1" class="lia-mention lia-mention-user"&gt;lhughes1&lt;/a&gt; , Try a measure like&lt;/P&gt;
&lt;P&gt;countx(filter(summarize(Table[employee number],"_1", count(Table[Assignments])),[_1]&amp;gt;1),[employee number])&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2020 15:28:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-employee-with-multiple-assignments-only-one-time/m-p/1507743#M29228</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-11-20T15:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: Count employee with multiple assignments only one time</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-employee-with-multiple-assignments-only-one-time/m-p/1507868#M29241</link>
      <description>&lt;P&gt;It's best to change the data model to something that follows Best Practices. If you do that, you'll have no problems with such calculcations. My suggestion is this. Create a dimension called Employee with columns Emp Number, Name, Health Premium. Then create a fact table Assignments with columns Emp Number, Assignment, FTE, Salary. Connect them with one-way filtering on Emp Number. All columns in fact tables should always be hidden and slicing should be only done via dimensions. Then create the required measures. [Total Health Premium] will be SUM( Employee[Health Premium] ). Easy. [Total Salary] will be SUM( Assignments[Salary] ). Easy again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The secret to good end-user experience, fast and SIMPLE DAX lies in the model itself. If you have a bad model, you'll be always struggling with simple things and your DAX will be awful. Do you want that? No. I thought so&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2020 16:24:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-employee-with-multiple-assignments-only-one-time/m-p/1507868#M29241</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-20T16:24:45Z</dc:date>
    </item>
  </channel>
</rss>

