<?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: How to find duplicated data in first column based on second column and show result as Status in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-duplicated-data-in-first-column-based-on-second/m-p/2202986#M51743</link>
    <description>&lt;P&gt;I would take it to Power Query to prepare the data for this.&lt;/P&gt;&lt;P&gt;What I'm doing here is:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Adding an "In" and an "Out" columns to flag the action of the row.&lt;/LI&gt;&lt;LI&gt;Grouping By Name and Date to get a single row for each Name+Date combination; "In" and "Out" would show 1 if there was a sign-in and sign-out for this combination, respectively.&lt;/LI&gt;&lt;LI&gt;Adding a column that checks if, for each&amp;nbsp;Name+Date combination, there were both a sign-in and sign-out; if so, "Complete".&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let&lt;BR /&gt;Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],&lt;BR /&gt;#"Changed Type" = Table.TransformColumnTypes(Source,{{"Employer Name", type text}, {"date", type datetime}, {"Action", type text}}),&lt;BR /&gt;#"Added Conditional Column" = Table.AddColumn(#"Changed Type", "In", each if [Action] = "sign_in" then 1 else null),&lt;BR /&gt;#"Added Conditional Column1" = Table.AddColumn(#"Added Conditional Column", "Out", each if [Action] = "sign_out" then 1 else null),&lt;BR /&gt;#"Grouped Rows" = Table.Group(#"Added Conditional Column1", {"Employer Name", "date"}, {{"Signed In", each List.Max([In]), type nullable number}, {"Signed Out", each List.Max([Out]), type nullable number}}),&lt;BR /&gt;Complete = Table.AddColumn(#"Grouped Rows", "Complete", each if [Signed In] = 1 and [Signed Out] = 1&lt;BR /&gt;then "Complete"&lt;BR /&gt;else "Incomplete")&lt;BR /&gt;in&lt;BR /&gt;Complete&lt;/P&gt;</description>
    <pubDate>Tue, 23 Nov 2021 06:41:44 GMT</pubDate>
    <dc:creator>rbriga</dc:creator>
    <dc:date>2021-11-23T06:41:44Z</dc:date>
    <item>
      <title>How to find duplicated data in first column based on second column and show result as Status</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-duplicated-data-in-first-column-based-on-second/m-p/2202932#M51741</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have one thing to solve.I want to add new column as "Complete or Not" deponding on Action Column.If one date have sign_in and sign_out,data in new column is "Complete" for that date.&lt;/P&gt;&lt;P&gt;Pls help me.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Nov 2021 06:09:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-duplicated-data-in-first-column-based-on-second/m-p/2202932#M51741</guid>
      <dc:creator>pmthu</dc:creator>
      <dc:date>2021-11-23T06:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to find duplicated data in first column based on second column and show result as Status</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-duplicated-data-in-first-column-based-on-second/m-p/2202986#M51743</link>
      <description>&lt;P&gt;I would take it to Power Query to prepare the data for this.&lt;/P&gt;&lt;P&gt;What I'm doing here is:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Adding an "In" and an "Out" columns to flag the action of the row.&lt;/LI&gt;&lt;LI&gt;Grouping By Name and Date to get a single row for each Name+Date combination; "In" and "Out" would show 1 if there was a sign-in and sign-out for this combination, respectively.&lt;/LI&gt;&lt;LI&gt;Adding a column that checks if, for each&amp;nbsp;Name+Date combination, there were both a sign-in and sign-out; if so, "Complete".&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let&lt;BR /&gt;Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],&lt;BR /&gt;#"Changed Type" = Table.TransformColumnTypes(Source,{{"Employer Name", type text}, {"date", type datetime}, {"Action", type text}}),&lt;BR /&gt;#"Added Conditional Column" = Table.AddColumn(#"Changed Type", "In", each if [Action] = "sign_in" then 1 else null),&lt;BR /&gt;#"Added Conditional Column1" = Table.AddColumn(#"Added Conditional Column", "Out", each if [Action] = "sign_out" then 1 else null),&lt;BR /&gt;#"Grouped Rows" = Table.Group(#"Added Conditional Column1", {"Employer Name", "date"}, {{"Signed In", each List.Max([In]), type nullable number}, {"Signed Out", each List.Max([Out]), type nullable number}}),&lt;BR /&gt;Complete = Table.AddColumn(#"Grouped Rows", "Complete", each if [Signed In] = 1 and [Signed Out] = 1&lt;BR /&gt;then "Complete"&lt;BR /&gt;else "Incomplete")&lt;BR /&gt;in&lt;BR /&gt;Complete&lt;/P&gt;</description>
      <pubDate>Tue, 23 Nov 2021 06:41:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-duplicated-data-in-first-column-based-on-second/m-p/2202986#M51743</guid>
      <dc:creator>rbriga</dc:creator>
      <dc:date>2021-11-23T06:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to find duplicated data in first column based on second column and show result as Status</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-duplicated-data-in-first-column-based-on-second/m-p/2208979#M52082</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="340650" data-lia-user-login="pmthu" class="lia-mention lia-mention-user"&gt;pmthu&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this DAX formula.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column = 
var _distinct = CALCULATE(DISTINCTCOUNT('Table'[action]),filter(ALLEXCEPT('Table','Table'[date]),'Table'[action]&amp;lt;&amp;gt;BLANK()))
return
IF(_distinct=2,"complete","not")&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Jay&lt;/P&gt;</description>
      <pubDate>Fri, 26 Nov 2021 08:16:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-find-duplicated-data-in-first-column-based-on-second/m-p/2208979#M52082</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-11-26T08:16:50Z</dc:date>
    </item>
  </channel>
</rss>

