<?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: Help with Vlookup using same column for search value and column value in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Vlookup-using-same-column-for-search-value-and-column/m-p/2573373#M73603</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please try&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;=
IF (
    TableName[ID]
        IN VALUES ( TableName[L] )
            &amp;amp;&amp;amp; TableName[ID] IN VALUES ( TableName[F] ),
    1,
    0
)&lt;/LI-CODE&gt;</description>
    <pubDate>Sun, 12 Jun 2022 19:16:54 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2022-06-12T19:16:54Z</dc:date>
    <item>
      <title>Help with Vlookup using same column for search value and column value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Vlookup-using-same-column-for-search-value-and-column/m-p/2573339#M73596</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I cant get my head around this problem in Power BI. I´m adding a new column to my table and want to check lookup if the same ID has value in both the column "F" and "L", but on different rows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example: The added column "Both F and L" should check if the same ID in the table has a value in both "F" and the "L" column, and if the same ID exist in the the table with the value "1" in both "F" and "L" then return 1 in the "Both F and L" column. I want to check if the customer has bought both the F and L product, but in different time periods.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My problem is I cant get the vlookup to work when using the same column for evertyhing (search value and search column). Dont want to create a new table for this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ID&lt;/TD&gt;&lt;TD&gt;F&lt;/TD&gt;&lt;TD&gt;L&lt;/TD&gt;&lt;TD&gt;Both F and L&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Niclas&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jun 2022 19:12:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Vlookup-using-same-column-for-search-value-and-column/m-p/2573339#M73596</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-12T19:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Vlookup using same column for search value and column value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Vlookup-using-same-column-for-search-value-and-column/m-p/2573351#M73599</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ok but why the result for the first ID 1 is 0?&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jun 2022 18:40:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Vlookup-using-same-column-for-search-value-and-column/m-p/2573351#M73599</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-06-12T18:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Vlookup using same column for search value and column value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Vlookup-using-same-column-for-search-value-and-column/m-p/2573372#M73602</link>
      <description>&lt;P&gt;Sorry, misstake from me&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jun 2022 19:12:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Vlookup-using-same-column-for-search-value-and-column/m-p/2573372#M73602</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-12T19:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Vlookup using same column for search value and column value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Vlookup-using-same-column-for-search-value-and-column/m-p/2573373#M73603</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please try&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;=
IF (
    TableName[ID]
        IN VALUES ( TableName[L] )
            &amp;amp;&amp;amp; TableName[ID] IN VALUES ( TableName[F] ),
    1,
    0
)&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 12 Jun 2022 19:16:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Vlookup-using-same-column-for-search-value-and-column/m-p/2573373#M73603</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-06-12T19:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Vlookup using same column for search value and column value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Vlookup-using-same-column-for-search-value-and-column/m-p/2574829#M73670</link>
      <description>&lt;P&gt;Hi! Thanks, but unfortunalety it doesn´t work. One thing that might add more complexity is that a ID can have multiple rows with values in column "F" and "L", but shouldn affect your code above?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;edit: Is the problem related to the value is not 1 in both "F" and "L" on the same row?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ID&lt;/TD&gt;&lt;TD&gt;F&lt;/TD&gt;&lt;TD&gt;L&lt;/TD&gt;&lt;TD&gt;Both F and L&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&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>Mon, 13 Jun 2022 10:37:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Vlookup-using-same-column-for-search-value-and-column/m-p/2574829#M73670</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-13T10:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Vlookup using same column for search value and column value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Vlookup-using-same-column-for-search-value-and-column/m-p/2574961#M73679</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;This is the result I get out of this code&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Am I missing something?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2022 10:48:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Vlookup-using-same-column-for-search-value-and-column/m-p/2574961#M73679</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-06-13T10:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Vlookup using same column for search value and column value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Vlookup-using-same-column-for-search-value-and-column/m-p/2574991#M73683</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No, it looks correct! Can there be some issue with the format of my table? The columns "F" and "L" are calculated columns in the datatype and format "Whole number". The ID columns is not calculated but has the same format and datatype.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2022 10:56:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Vlookup-using-same-column-for-search-value-and-column/m-p/2574991#M73683</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-13T10:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Vlookup using same column for search value and column value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Vlookup-using-same-column-for-search-value-and-column/m-p/2575007#M73685</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;Try either&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;=
IF (
    TableName[ID]
        &amp;amp; ""
            IN VALUES ( TableName[L] )
                &amp;amp;&amp;amp; TableName[ID] IN VALUES ( TableName[F] ),
    1,
    0
)&lt;/LI-CODE&gt;&lt;P&gt;OR&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;=
IF (
    VALUE ( TableName[ID] )
        IN VALUES ( TableName[L] )
            &amp;amp;&amp;amp; TableName[ID] IN VALUES ( TableName[F] ),
    1,
    0
)&lt;/LI-CODE&gt;&lt;P&gt;Otherwise check for hidden charactors or spaces. Try to clean the column in PQ&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2022 11:00:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Vlookup-using-same-column-for-search-value-and-column/m-p/2575007#M73685</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-06-13T11:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Vlookup using same column for search value and column value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Vlookup-using-same-column-for-search-value-and-column/m-p/2576903#M73814</link>
      <description>&lt;P&gt;Hi! I did some testing with sample ID. And the dax is only working when I put ID as 1 and not for example 5 or 1XXXX as some ID contains more than one number.&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;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 07:16:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Vlookup-using-same-column-for-search-value-and-column/m-p/2576903#M73814</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-14T07:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Vlookup using same column for search value and column value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Vlookup-using-same-column-for-search-value-and-column/m-p/2576976#M73815</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems I misunderstood tour requirement. I will modify the formula&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 07:44:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Vlookup-using-same-column-for-search-value-and-column/m-p/2576976#M73815</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-06-14T07:44:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Vlookup using same column for search value and column value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Vlookup-using-same-column-for-search-value-and-column/m-p/2577686#M73861</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;Please use&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;=
VAR CurrentIDTable =
    CALCULATETABLE ( TableName, ALLEXCEPT ( TableName, TableName[ID] ) )
VAR FValue =
    SUMX ( CurrentIDTable, TableName[F] )
VAR LValue =
    SUMX ( CurrentIDTable, TableName[L] )
RETURN
    IF ( FValue &amp;gt; 0 &amp;amp;&amp;amp; LValue &amp;gt; 0, 1, 0 )&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 14 Jun 2022 13:00:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Vlookup-using-same-column-for-search-value-and-column/m-p/2577686#M73861</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-06-14T13:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Vlookup using same column for search value and column value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Vlookup-using-same-column-for-search-value-and-column/m-p/2582077#M74115</link>
      <description>&lt;P&gt;Thank you really appreciated it!&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 06:14:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-Vlookup-using-same-column-for-search-value-and-column/m-p/2582077#M74115</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-16T06:14:58Z</dc:date>
    </item>
  </channel>
</rss>

