<?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 LOOKUP VALUE FOR DUPLICATE IDs in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/LOOKUP-VALUE-FOR-DUPLICATE-IDs/m-p/2851623#M91430</link>
    <description>&lt;P&gt;Hey gurus,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate your help on the below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table that has IDs and flags&lt;/P&gt;&lt;P&gt;ID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Flag&lt;/P&gt;&lt;P&gt;888&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Y&lt;/P&gt;&lt;P&gt;888&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; N&lt;/P&gt;&lt;P&gt;999&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; N&lt;/P&gt;&lt;P&gt;999&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; N&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to return Y for the ID if it occured once that the Flag is Y.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so in my unique IDs table it will return the below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;888&amp;nbsp; &amp;nbsp;Y&lt;/P&gt;&lt;P&gt;999&amp;nbsp; &amp;nbsp;N&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is as if it searches if 888 has Y in the flag column and returns Y&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Amr&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Oct 2022 14:41:17 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-10-19T14:41:17Z</dc:date>
    <item>
      <title>LOOKUP VALUE FOR DUPLICATE IDs</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/LOOKUP-VALUE-FOR-DUPLICATE-IDs/m-p/2851623#M91430</link>
      <description>&lt;P&gt;Hey gurus,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate your help on the below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table that has IDs and flags&lt;/P&gt;&lt;P&gt;ID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Flag&lt;/P&gt;&lt;P&gt;888&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Y&lt;/P&gt;&lt;P&gt;888&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; N&lt;/P&gt;&lt;P&gt;999&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; N&lt;/P&gt;&lt;P&gt;999&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; N&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to return Y for the ID if it occured once that the Flag is Y.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so in my unique IDs table it will return the below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;888&amp;nbsp; &amp;nbsp;Y&lt;/P&gt;&lt;P&gt;999&amp;nbsp; &amp;nbsp;N&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is as if it searches if 888 has Y in the flag column and returns Y&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Amr&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2022 14:41:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/LOOKUP-VALUE-FOR-DUPLICATE-IDs/m-p/2851623#M91430</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-19T14:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: LOOKUP VALUE FOR DUPLICATE IDs</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/LOOKUP-VALUE-FOR-DUPLICATE-IDs/m-p/2851637#M91432</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please check the below picture and the attached pbix file, whether it works.&lt;/P&gt;
&lt;P&gt;It is for creating a new table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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;LI-CODE lang="markup"&gt;New ID Table =
ADDCOLUMNS (
    SUMMARIZE ( Data, Data[ID] ),
    "@Flag", IF ( "Y" IN CALCULATETABLE ( DISTINCT ( Data[Flag] ) ), "Y", "N" )
)
&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 19 Oct 2022 14:48:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/LOOKUP-VALUE-FOR-DUPLICATE-IDs/m-p/2851637#M91432</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-10-19T14:48:55Z</dc:date>
    </item>
  </channel>
</rss>

