<?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: values and distinc function input in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/values-and-distinc-function-input/m-p/3492932#M133769</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="631417" data-lia-user-login="jzhao" class="lia-mention lia-mention-user"&gt;jzhao&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;The reason for the error in your second code is that you are using the VALUES function instead of the DISTINCT function to return a table of unique rows. The VALUES function returns a one-column table that contains the distinct values from the specified column, optionally ignoring any blank values. However, in your case, you are passing a table expression to the VALUES function, which is not a valid argument. The VALUES function expects a column reference as its input parameter.&lt;/P&gt;
&lt;P&gt;The DISTINCT function, on the other hand, returns a table by removing duplicate rows from another table or expression. The DISTINCT function can take any table expression as its input parameter, and it will return a table with the same columns and only distinct rows.&lt;/P&gt;
&lt;P&gt;Therefore, to fix your error, you need to replace the VALUES function with the DISTINCT function in your second code, as you did in your first code. This will ensure that you are passing a valid table expression to the FILTER function, and that you are getting a table of unique rows from three different columns in three different tables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/Find-and-Replace-values-either-by-a-measure-and-or-Power-Query/m-p/801846" target="_blank"&gt;Solved: Find and Replace values either by a measure and or... - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/distinct-table-function-dax" target="_blank"&gt;DISTINCT (table) function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/43348370/dax-query-to-get-distinct-items-from-multiple-tables" target="_blank"&gt;powerbi - DAX Query to Get Distinct Items from Multiple Tables - Stack Overflow&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;How to Get Your Question Answered Quickly&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;BR /&gt;Community Support Team _ Rongtie&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 24 Oct 2023 05:51:56 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-10-24T05:51:56Z</dc:date>
    <item>
      <title>values and distinc function input</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/values-and-distinc-function-input/m-p/3477975#M132920</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I want to retrieve unique rows from three different columns in three different tables. Then, I want to filter out rows that contain `*` or are blank. The following code provides the desired result:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;All projects =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FILTER&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;FONT color="#FF0000"&gt;&lt;SPAN&gt;DISTINCT&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;UNION&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;VALUES&lt;/SPAN&gt;&lt;SPAN&gt;('table1'[column 1 clean]),&lt;/SPAN&gt;&lt;SPAN&gt;VALUES&lt;/SPAN&gt;&lt;SPAN&gt;('table 2'[column2 clean])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;([Cust_Po_num_Clean]&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;BLANK&lt;/SPAN&gt;&lt;SPAN&gt;()&amp;amp;&amp;amp;[Cust_Po_num_Clean]&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;"0"&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;&amp;amp; [Cust_Po_num_Clean]&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;"#"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;TRUE&lt;/SPAN&gt;&lt;SPAN&gt;(),&lt;/SPAN&gt;&lt;SPAN&gt;FALSE&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;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;SPAN&gt;However, the following code generates an error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;All projects =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FILTER&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;FONT color="#FF0000"&gt;&lt;SPAN&gt;Values&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;UNION&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;VALUES&lt;/SPAN&gt;&lt;SPAN&gt;('table1'[column 1 clean]),&lt;/SPAN&gt;&lt;SPAN&gt;VALUES&lt;/SPAN&gt;&lt;SPAN&gt;('table 2'[column2 clean])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;([Cust_Po_num_Clean]&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;BLANK&lt;/SPAN&gt;&lt;SPAN&gt;()&amp;amp;&amp;amp;[Cust_Po_num_Clean]&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;"0"&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;&amp;amp; [Cust_Po_num_Clean]&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;"#"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;TRUE&lt;/SPAN&gt;&lt;SPAN&gt;(),&lt;/SPAN&gt;&lt;SPAN&gt;FALSE&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;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;What could be the reason for the error?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 06:33:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/values-and-distinc-function-input/m-p/3477975#M132920</guid>
      <dc:creator>jzhao</dc:creator>
      <dc:date>2023-10-16T06:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: values and distinc function input</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/values-and-distinc-function-input/m-p/3480264#M133027</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="631417" data-lia-user-login="jzhao" class="lia-mention lia-mention-user"&gt;jzhao&lt;/a&gt;&amp;nbsp;UNION function&amp;nbsp;features: T&lt;SPAN&gt;he two tables must have the same number of columns. In example column1 clean and column&lt;FONT color="#FF0000"&gt;2&lt;/FONT&gt; clean&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/union-function-dax?WT.mc_id=DP-MVP-4025372" target="_self"&gt;https://learn.microsoft.com/en-us/dax/union-function-dax?WT.mc_id=DP-MVP-4025372&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Did I answer your question? Kudos appreciated / accept solution!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2023 05:53:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/values-and-distinc-function-input/m-p/3480264#M133027</guid>
      <dc:creator>some_bih</dc:creator>
      <dc:date>2023-10-17T05:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: values and distinc function input</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/values-and-distinc-function-input/m-p/3492932#M133769</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="631417" data-lia-user-login="jzhao" class="lia-mention lia-mention-user"&gt;jzhao&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;The reason for the error in your second code is that you are using the VALUES function instead of the DISTINCT function to return a table of unique rows. The VALUES function returns a one-column table that contains the distinct values from the specified column, optionally ignoring any blank values. However, in your case, you are passing a table expression to the VALUES function, which is not a valid argument. The VALUES function expects a column reference as its input parameter.&lt;/P&gt;
&lt;P&gt;The DISTINCT function, on the other hand, returns a table by removing duplicate rows from another table or expression. The DISTINCT function can take any table expression as its input parameter, and it will return a table with the same columns and only distinct rows.&lt;/P&gt;
&lt;P&gt;Therefore, to fix your error, you need to replace the VALUES function with the DISTINCT function in your second code, as you did in your first code. This will ensure that you are passing a valid table expression to the FILTER function, and that you are getting a table of unique rows from three different columns in three different tables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/Find-and-Replace-values-either-by-a-measure-and-or-Power-Query/m-p/801846" target="_blank"&gt;Solved: Find and Replace values either by a measure and or... - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/distinct-table-function-dax" target="_blank"&gt;DISTINCT (table) function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/43348370/dax-query-to-get-distinct-items-from-multiple-tables" target="_blank"&gt;powerbi - DAX Query to Get Distinct Items from Multiple Tables - Stack Overflow&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;How to Get Your Question Answered Quickly&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;BR /&gt;Community Support Team _ Rongtie&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2023 05:51:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/values-and-distinc-function-input/m-p/3492932#M133769</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-24T05:51:56Z</dc:date>
    </item>
  </channel>
</rss>

