<?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 return values from Intersect in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/return-values-from-Intersect/m-p/2948097#M97612</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I'm trying to get the LeadID that intersects two tables&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created this measure:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure = 
 VAR _StartDate =
    CALCULATE (
        MIN ( FactMarketingFunnel[StartDate] ),
        ALL ( FactMarketingFunnel ),
        USERELATIONSHIP ( FactMarketingFunnel[StartDate], dimDates[Date] )
    )
VAR _EndDate =
    CALCULATE (
        MAX ( FactMarketingFunnel[StartDate] ),
        ALL ( FactMarketingFunnel ),
        USERELATIONSHIP ( FactMarketingFunnel[StartDate], dimDates[Date] )
    )
VAR _main =
    CALCULATETABLE (
        SUMMARIZE (
            FILTER (
                FactMarketingFunnel,
                FactMarketingFunnel[Stage] = "Leads"
                    &amp;amp;&amp;amp; FactMarketingFunnel[StartDate] &amp;gt;= _StartDate
                    &amp;amp;&amp;amp; FactMarketingFunnel[StartDate] &amp;lt;= _EndDate
            ),
            FactMarketingFunnel[Lead_ID],
            FactMarketingFunnel[Lead_Created_Date]
            
        ) --,
      
    )
VAR _int =
    CALCULATETABLE (
        SUMMARIZE (
            FILTER (
                FactMarketingFunnel,
                FactMarketingFunnel[Stage] = "Opportunities Won Opps"
                    &amp;amp;&amp;amp; FactMarketingFunnel[StartDate] &amp;gt;= _StartDate
                    &amp;amp;&amp;amp; FactMarketingFunnel[StartDate] &amp;lt;= _EndDate
            ),
            FactMarketingFunnel[Lead_ID],
            FactMarketingFunnel[Lead_Created_Date]
        ) 
    
    )


RETURN
INTERSECT ( _main, _int )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how can I return the relevant LeadID?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 05 Dec 2022 10:19:13 GMT</pubDate>
    <dc:creator>ReutAtias12</dc:creator>
    <dc:date>2022-12-05T10:19:13Z</dc:date>
    <item>
      <title>return values from Intersect</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/return-values-from-Intersect/m-p/2948097#M97612</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I'm trying to get the LeadID that intersects two tables&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created this measure:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure = 
 VAR _StartDate =
    CALCULATE (
        MIN ( FactMarketingFunnel[StartDate] ),
        ALL ( FactMarketingFunnel ),
        USERELATIONSHIP ( FactMarketingFunnel[StartDate], dimDates[Date] )
    )
VAR _EndDate =
    CALCULATE (
        MAX ( FactMarketingFunnel[StartDate] ),
        ALL ( FactMarketingFunnel ),
        USERELATIONSHIP ( FactMarketingFunnel[StartDate], dimDates[Date] )
    )
VAR _main =
    CALCULATETABLE (
        SUMMARIZE (
            FILTER (
                FactMarketingFunnel,
                FactMarketingFunnel[Stage] = "Leads"
                    &amp;amp;&amp;amp; FactMarketingFunnel[StartDate] &amp;gt;= _StartDate
                    &amp;amp;&amp;amp; FactMarketingFunnel[StartDate] &amp;lt;= _EndDate
            ),
            FactMarketingFunnel[Lead_ID],
            FactMarketingFunnel[Lead_Created_Date]
            
        ) --,
      
    )
VAR _int =
    CALCULATETABLE (
        SUMMARIZE (
            FILTER (
                FactMarketingFunnel,
                FactMarketingFunnel[Stage] = "Opportunities Won Opps"
                    &amp;amp;&amp;amp; FactMarketingFunnel[StartDate] &amp;gt;= _StartDate
                    &amp;amp;&amp;amp; FactMarketingFunnel[StartDate] &amp;lt;= _EndDate
            ),
            FactMarketingFunnel[Lead_ID],
            FactMarketingFunnel[Lead_Created_Date]
        ) 
    
    )


RETURN
INTERSECT ( _main, _int )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how can I return the relevant LeadID?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2022 10:19:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/return-values-from-Intersect/m-p/2948097#M97612</guid>
      <dc:creator>ReutAtias12</dc:creator>
      <dc:date>2022-12-05T10:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: return values from Intersect</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/return-values-from-Intersect/m-p/2948820#M97662</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="473427" data-lia-user-login="ReutAtias12" class="lia-mention lia-mention-user"&gt;ReutAtias12&lt;/a&gt; , Assume you have a common table lead with lead ID and measure from 2 tables joined to it say M1 and M2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;then intersect is&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;countx(values(Lead[Lead ID]), if(not(isblank([M1])) &amp;amp;&amp;amp; not(isblank([M2])) , [Lead ID], blank()) )&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2022 15:21:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/return-values-from-Intersect/m-p/2948820#M97662</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-12-05T15:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: return values from Intersect</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/return-values-from-Intersect/m-p/2948848#M97667</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;M1 and M2 are virtual tables that I'm creating in the measure&lt;/P&gt;&lt;P&gt;They are supposed to be dynamic base on the user filters for the stage field&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2022 15:34:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/return-values-from-Intersect/m-p/2948848#M97667</guid>
      <dc:creator>ReutAtias12</dc:creator>
      <dc:date>2022-12-05T15:34:42Z</dc:date>
    </item>
  </channel>
</rss>

