<?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: Table.Distinct with the condition in PowerQuery in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Table-Distinct-with-the-condition-in-PowerQuery/m-p/2591005#M74644</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="343736" data-lia-user-login="kmatveyko" class="lia-mention lia-mention-user"&gt;kmatveyko&lt;/a&gt; , I think you need first filter the values and then take distinct &lt;/P&gt;</description>
    <pubDate>Tue, 21 Jun 2022 04:12:13 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2022-06-21T04:12:13Z</dc:date>
    <item>
      <title>Table.Distinct with the condition in PowerQuery</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Table-Distinct-with-the-condition-in-PowerQuery/m-p/2590048#M74589</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have a problem with PowerQuery. So, I&amp;nbsp;need to apply&amp;nbsp;Distinct function in my table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But with one&amp;nbsp;condition: repeatable values should be deleted&amp;nbsp;if their value is greater than 0.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please help me to write a fuction on PowerQuery M. Maybe it's possible to use IF-expression?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Example, if 'ID'&amp;gt;0 then Table.Distinct(#"", {"ID"}) else 0.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2022 15:40:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Table-Distinct-with-the-condition-in-PowerQuery/m-p/2590048#M74589</guid>
      <dc:creator>kmatveyko</dc:creator>
      <dc:date>2022-06-20T15:40:38Z</dc:date>
    </item>
    <item>
      <title>Re: Table.Distinct with the condition in PowerQuery</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Table-Distinct-with-the-condition-in-PowerQuery/m-p/2591005#M74644</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="343736" data-lia-user-login="kmatveyko" class="lia-mention lia-mention-user"&gt;kmatveyko&lt;/a&gt; , I think you need first filter the values and then take distinct &lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2022 04:12:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Table-Distinct-with-the-condition-in-PowerQuery/m-p/2591005#M74644</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-06-21T04:12:13Z</dc:date>
    </item>
    <item>
      <title>Re: Table.Distinct with the condition in PowerQuery</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Table-Distinct-with-the-condition-in-PowerQuery/m-p/2592112#M74690</link>
      <description>&lt;P&gt;Not quite. For example, here is a column:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;20155&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;20156&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;20157&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;20157&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;20157&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;20158&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;20159&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Needs to delete duplicated values 20157 (two times). Nulls should stay in a column as they are.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a&amp;nbsp;required result:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;20155&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;20156&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;20157&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;20158&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;20159&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2022 11:35:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Table-Distinct-with-the-condition-in-PowerQuery/m-p/2592112#M74690</guid>
      <dc:creator>kmatveyko</dc:creator>
      <dc:date>2022-06-21T11:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: Table.Distinct with the condition in PowerQuery</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Table-Distinct-with-the-condition-in-PowerQuery/m-p/2789729#M87544</link>
      <description>&lt;P&gt;this should work&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Table.FromRows(List.Distinct(Table.ToRows(Source),each if _{0}=0 then Text.NewGuid() else _{0}))&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 23 Sep 2022 11:48:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Table-Distinct-with-the-condition-in-PowerQuery/m-p/2789729#M87544</guid>
      <dc:creator>RenaudOne</dc:creator>
      <dc:date>2022-09-23T11:48:07Z</dc:date>
    </item>
  </channel>
</rss>

